{"id":"MAL-2026-15860","summary":"Malicious code in py-0requests (PyPI)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (bd1f4c6176eadca0e4a460d4434e9957eb9befa90d85feecd49e4baf7f3abb4b)\npy-0requests is a homoglyph typosquat of the PyPI package `requests` (letter `o` replaced with digit `0`). On `import py_0requests`, top-level code in the package's `__init__.py` scrapes `os.environ` for keys prefixed with SECRET, API, TOKEN, or KEY and sends the collected dictionary over a TCP socket to a host/port read from `TS_HOST`/`TS_PORT` (defaulting to 127.0.0.1:9999). The same import path spawns a Python subprocess that opens a TCP connection to the same destination, sends a `SHELL` marker, and holds the socket open, providing a reverse-shell handshake to whichever operator controls the destination. The package's CLI banner self-identifies as `targeting requests` and ships no HTTP-client API.\n\n## Source: kam193 (0d447dd088f92d3af66ecad461725f2df268f5f073e22a7293b3f946451933fb)\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:06.028399938Z","published":"2026-09-03T17:01:32Z","database_specific":{"malicious-packages-origins":[{"id":"pypi/2026-09-0requests/py-0requests","import_time":"2026-09-03T17:16:47.035550803Z","modified_time":"2026-09-03T17:01:32.373433Z","sha256":"0d447dd088f92d3af66ecad461725f2df268f5f073e22a7293b3f946451933fb","source":"kam193","versions":["0.0.1"]},{"id":"IN-MAL-2026-019374","import_time":"2026-09-04T00:45:54.077932787Z","modified_time":"2026-09-03T23:48:29Z","sha256":"bd1f4c6176eadca0e4a460d4434e9957eb9befa90d85feecd49e4baf7f3abb4b","source":"amazon-inspector","versions":["0.0.1"]}]},"references":[{"type":"WEB","url":"https://bad-packages.kam193.eu/pypi/package/py-0requests"},{"type":"PACKAGE","url":"https://pypi.org/project/py-0requests/0.0.1/"}],"affected":[{"package":{"name":"py-0requests","ecosystem":"PyPI","purl":"pkg:pypi/py-0requests"},"versions":["0.0.1"],"database_specific":{"cwes":[{"name":"Embedded Malicious Code","cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature."}],"indicators":{"package_integrity":[{"filename":"py_0requests-0.0.1-py3-none-any.whl","hashes":{"blake2b_256":"089b7f9fe4f3b77da20e9292a30893cdc4e7eb67a442f9e1c9b5b7397778809f","md5":"4bb8c0d15b686460484d3cfd9bf616e3","sha256":"1a3d4213191380f2f09a2c6a8e510a20c71dc9dde4ea6e67a977452da14c0985"}},{"filename":"py_0requests-0.0.1.tar.gz","hashes":{"sha256":"ffca2ff436b06e05eed5e661f350544cd2af35d728c1a05e66451e3fcd86fdec","blake2b_256":"eaa961f90f79186ab9c6c069f5be0140ba8db4d13c3b1d88c18816641a9a3d44","md5":"1e63686f5c74a119ab4354b6850ec0db"}}],"evidence_files":[{"sha256":"b2a6588476f40845a2df173d57d436dc47c0dfd044bcffdc936be1b509cffd3d","tlsh":"00111ee2e859092d307a67428527503da3b3d2415b35680277b85e32af37ba8307a6b8","path":"py_0requests/__init__.py"},{"sha256":"243486ebc4e74e34073708b1802cfe7eb7df38250d153e30776d6d1dd118a2f4","tlsh":"d8a022ae0fc82838e830800fac0203288000f03220333032eace038e0c82280c8c00a8","path":"py_0requests/cli.py"}]},"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/pypi/py-0requests/MAL-2026-15860.json"}}],"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"}]}