requests-cryptPyPI
Advisory published Updated
requests-crypt is a confirmed malicious PyPI package (MAL-2026-14351) that steals credentials and exfiltrates sensitive data (malicious version 0.1.0). Do not install it — remove it immediately and rotate any exposed credentials.
Malicious code in requests-crypt (PyPI)
What this malware does
requests-crypt wraps an HTTP client so that every JSON response passes through a DataProcessor that reads a configurable field (default 'cos') from the response body, base64-decodes its string value, and passes the result to exec() on the caller's host. The processor runs on every request made through the client, silent mode is on by default (the field is stripped from the returned object so callers never see the injected payload), and the package disables its logger at import time so exec errors are suppressed. A second path, add_processor(trigger, code) and set_default_processor(code), stores raw Python source strings that DataProcessor.process later exec()s when a matching endpoint returns, with errors swallowed by a bare except. Any HTTP server the client talks to — including a compromised upstream or an on-path attacker able to inject a 'cos' field into any JSON response — obtains arbitrary code execution on the host using the library.
The package contains a hidden backdoor. The promised functionality is an HTTP request library with some additional functions. On every usage, code secretly checks for the presence of specific fields in the response, and if they are found, their content is secretly executed.
Category: MALICIOUS - The campaign has clearly malicious intent, like infostealers.
Campaign: 2026-08-reqcrypt
Reasons (based on the campaign):
- backdoor
Malicious versions
Indicators of compromise (SHA-256)
Detection & response playbook
Credential / info stealerFind it
Search your lockfiles and build artifacts for requests-crypt (version 0.1.0).
If you installed it — respond
requests-crypt is built to steal secrets, so assume every credential the build or runtime could read is compromised. Remove it from your project and lockfile, then rotate ALL exposed secrets — npm/registry tokens, cloud keys, CI/CD secrets, SSH keys, and any .env values — from a known-clean machine. Audit logs for unauthorized use of those credentials.
Did it already run?
If requests-crypt was installed, its post-install payload may already have run. Removing the package does not undo that — check outbound connections and credential use from the install window onward.
Frequently asked questions
Campaign
References
Credits
- Amazon Inspector · finder
- Kamil Mańkowski (kam193) · reporter
Detect & block this
O3 blocks requests-crypt-class packages before install and in CI — and if it already ran, its runtime egress monitoring catches the credential exfiltration and severs the channel.