MAL-2026-20665: Malicious code in httpnex (PyPI)

Published Nov 26, 2026
·
Updated

--- -= Per source details. Do not edit below this line.=-

Source: amazon-inspector (e4b0b6a8a90903d9183cb60e31a9afbca2ab29188a1168079f703e47ab5bfb2e) httpnex 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 HXURL 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.

Source: kam193 (9e9626e3f4a74969244ba936beece1847054336cd2c1b151744d264db65ce57c) Clone 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.

---

Category: MALICIOUS - The campaign has clearly malicious intent, like infostealers.

Campaign: 2026-11-httpnex

Reasons (based on the campaign):

- Downloads and executes a remote malicious script.

- clones-real-package

Affected Software

1 affected component
pip/httpnex=0.1.0, =0.1.1

Event History

Nov 26, 2026
Advisory Published
via OSV·08:05 PM
Data Sourced
via OSV·08:05 PM
DescriptionAffected Software
Nov 27, 2026
Updated
via OSV·12:45 AM
Description

Frequently Asked Questions

1

What user action triggers the malicious behavior?

The package performs its remote payload check during import. No separate command or configuration step is described.

2

Was a malicious payload observed being delivered by the command-and-control server?

During analysis, the command-and-control server did not deliver a payload. The package nevertheless includes logic to obtain a remote payload and periodically check again in a background thread.

3

What could happen if the remote server provides a payload?

The package is designed to inject the remotely obtained payload into local files. It also starts a background thread to repeatedly check for updated payloads.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203