{"id":"MAL-2026-15861","summary":"Malicious code in py-1requests (PyPI)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (bd6d1a5c78d4368dc76a90cc90a68e4264170ed9ef208c8096251798734bb0d6)\npy_1requests is a typosquat of the popular `requests` library (leading `1` inserted inside the name). On import, py_1requests/__init__.py iterates os.environ and collects every variable whose name starts with SECRET, API, TOKEN, or KEY, then opens a TCP socket to HOST:PORT and sends the serialized dict; HOST and PORT default to 127.0.0.1:9999 but are overridable via the TS_HOST and TS_PORT environment variables. The same __init__.py spawns a python subprocess that connects to the same host/port and sends a 'SHELL' marker, holding the connection open — a reverse-shell staging path. cli.py prints 'py_1requests installed -- targeting requests' and __init__.py prints '[typosquat] exfiltrating:...', in-source admissions of purpose. Both behaviors fire unconditionally on import with no documented purpose.\n\n## Source: kam193 (877b4b612041848c46e9fb32160b85b74e7c3e983a38313017bc8c034e5f93da)\nDuring import, the code exfiltrates potentially sensitive env variables. In all analyzed versions the exfiltration target was a localhost, suggesting it was just a test.\n\n\n---\n\nCategory: PROBABLY_PENTEST - Packages looking like typical pentest packages, but also anything that looks like testing, exploring pre-prepared kits, research & co, with clearly low-harm possibilities.\n\n\nCampaign: 2026-09-0requests\n\n\nReasons (based on the campaign):\n\n\n - exfiltration-env-variables\n\n\n - typosquatting\n","modified":"2026-09-04T01:00:05.164314066Z","published":"2026-09-03T17:02:02Z","database_specific":{"malicious-packages-origins":[{"modified_time":"2026-09-03T17:02:03.007584Z","sha256":"877b4b612041848c46e9fb32160b85b74e7c3e983a38313017bc8c034e5f93da","source":"kam193","versions":["0.0.1"],"id":"pypi/2026-09-0requests/py-1requests","import_time":"2026-09-03T17:16:47.036527917Z"},{"source":"amazon-inspector","versions":["0.0.1"],"id":"IN-MAL-2026-019386","import_time":"2026-09-04T00:45:54.899058915Z","modified_time":"2026-09-03T23:50:24Z","sha256":"bd6d1a5c78d4368dc76a90cc90a68e4264170ed9ef208c8096251798734bb0d6"}]},"references":[{"type":"WEB","url":"https://bad-packages.kam193.eu/pypi/package/py-1requests"},{"type":"PACKAGE","url":"https://pypi.org/project/py-1requests/0.0.1/"}],"affected":[{"package":{"name":"py-1requests","ecosystem":"PyPI","purl":"pkg:pypi/py-1requests"},"versions":["0.0.1"],"database_specific":{"indicators":{"evidence_files":[{"path":"py_1requests/__init__.py","sha256":"b2a6588476f40845a2df173d57d436dc47c0dfd044bcffdc936be1b509cffd3d","tlsh":"00111ee2e859092d307a67428527503da3b3d2415b35680277b85e32af37ba8307a6b8"}],"package_integrity":[{"filename":"py_1requests-0.0.1-py3-none-any.whl","hashes":{"md5":"131defaa4751d8031e80be024a64549b","sha256":"deb530d11fcd2b05d46819d575e75177e3d85b516223e29b689a3f8702024fa4","blake2b_256":"61e9d656f64e0ff5dd550c66ef351de9e939c12ada6b6dcfdc61c3bea3c674b6"}},{"filename":"py_1requests-0.0.1.tar.gz","hashes":{"blake2b_256":"403837766994f94a3b6e99bfb32a83bd9a6b6f10ba9124d8f733a6a301be2d8c","md5":"e8934d43091cfde5f7cee946f45504b8","sha256":"6d6bc65ef1138fd22d60d1acad1c612678b951858a5c3df3cbde726503ba385c"}}]},"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/pypi/py-1requests/MAL-2026-15861.json","cwes":[{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"}]}}],"schema_version":"1.9.0","credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"},{"name":"Kamil Mańkowski (kam193)","contact":["https://github.com/kam193","https://bad-packages.kam193.eu/"],"type":"ANALYST"}]}