{"id":"MAL-2026-20665","summary":"Malicious code in httpnex (PyPI)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (e4b0b6a8a90903d9183cb60e31a9afbca2ab29188a1168079f703e47ab5bfb2e)\nhttpnex is an httpx look-alike whose `httpnex/__init__.py` ends with an undocumented `from._warmup import _boot` call. On import, `_warmup.py` starts a background thread that downloads Python source from https://fpapi.cc.cd/load (overridable via an HX_URL environment variable) and writes it, wrapped in `#hx` marker comments, into the installer's own entry scripts (main.py, run.py, bot.py, app.py, __main__.py, start.py) in the current working directory, after creating `.bak` copies. No signature or integrity verification is performed and the destination domain is unrelated to the declared upstream project. The fallback payload embedded in `_warmup.py` as `_DEFAULT` — the block written into the entry files when the remote fetch fails — spawns a daemon thread that polls https://fpapi.cc.cd/pool roughly every 60 seconds, sends the machine hostname from `socket.gethostname()` in an `X-H` request header, and executes the base64- plus zlib-decoded response via `exec(compile(...))`. The result is unauthenticated remote command execution on the host, host-identifier disclosure to the operator domain, and persistence written directly into the developer's project source so the channel reopens on every subsequent run of the modified program.\n\n## Source: kam193 (9e9626e3f4a74969244ba936beece1847054336cd2c1b151744d264db65ce57c)\nClone of a popular library with added malicious code: during import, package looks for a remote payload to inject into local files, and starts a background thread that periodically re-checks for a new payload. During analysis, C2 did not deliver the payload.\n\n\n---\n\nCategory: MALICIOUS - The campaign has clearly malicious intent, like infostealers.\n\n\nCampaign: 2026-11-httpnex\n\n\nReasons (based on the campaign):\n\n\n - Downloads and executes a remote malicious script.\n\n\n - clones-real-package\n","modified":"2026-11-27T00:45:05.381491394Z","published":"2026-11-26T20:05:38Z","database_specific":{"malicious-packages-origins":[{"versions":["0.1.0","0.1.1"],"id":"pypi/2026-11-httpnex/httpnex","import_time":"2026-11-26T20:37:05.181359401Z","modified_time":"2026-11-26T20:05:38.183737Z","sha256":"9e9626e3f4a74969244ba936beece1847054336cd2c1b151744d264db65ce57c","source":"kam193"},{"source":"amazon-inspector","versions":["0.1.0"],"id":"IN-MAL-2026-023133","import_time":"2026-11-27T00:30:27.826213947Z","modified_time":"2026-11-27T00:11:27Z","sha256":"332e59dd9f4d1a403b49302fcde1d48139e9a6f8c0ffca8db5f810cd4a92e163"},{"source":"amazon-inspector","versions":["0.1.1"],"id":"IN-MAL-2026-023134","import_time":"2026-11-27T00:30:27.862145367Z","modified_time":"2026-11-27T00:11:39Z","sha256":"e4b0b6a8a90903d9183cb60e31a9afbca2ab29188a1168079f703e47ab5bfb2e"}],"iocs":{"urls":["https://fpapi.cc.cd/load","https://fpapi.cc.cd/pool"],"domains":["fpapi.cc.cd"]}},"references":[{"type":"WEB","url":"https://bad-packages.kam193.eu/pypi/package/httpnex"},{"type":"PACKAGE","url":"https://pypi.org/project/httpnex/0.1.0/"},{"type":"PACKAGE","url":"https://pypi.org/project/httpnex/0.1.1/"}],"affected":[{"package":{"name":"httpnex","ecosystem":"PyPI","purl":"pkg:pypi/httpnex"},"versions":["0.1.0","0.1.1"],"database_specific":{"cwes":[{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"},{"description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code","cweId":"CWE-506"}],"indicators":{"evidence_files":[{"artifacts":["httpnex-0.1.0.tar.gz","httpnex-0.1.0-py3-none-any.whl"],"path":"httpnex/_warmup.py","sha256":"6668d5b2c9ac49c595e73407f4a799443a0c6f54121df4b7714ca4027b4fdfff","tlsh":"430242919c556cb3c7a293bc1d25c260a33ebd83ad066574feec93582f5e179c0f02a9"}],"package_integrity":[{"filename":"httpnex-0.1.0-py3-none-any.whl","hashes":{"sha256":"dfd394ce46810214f8d83e97ff65e6650e22827bfebc1d15db1a570b1843c290","blake2b_256":"e74fe8c68725991dec6c508a72f2857df106f914bbfea59c1470853f72ec9d7e","md5":"98dd63a6db70df39fda4939007fe7f2d"}},{"hashes":{"blake2b_256":"6a306ef4aec0f8263a6bd01c6e8a8a1901733c5bb1cfc5009e49a6178e89edff","md5":"2ccba1eb66c8e14c96138d489d330f42","sha256":"eee5c8cd91267730ac506e829a8d107b0ca3c9fa77d92e70797e2dc32cd24ca2"},"filename":"httpnex-0.1.0.tar.gz"}]},"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/pypi/httpnex/MAL-2026-20665.json"}}],"schema_version":"1.9.2","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":"REPORTER"}]}