Malicious code in reqcrypt (PyPI)
The reqcrypt PyPI package contains intentionally hidden malicious code that executes arbitrary Python code from attacker-controlled HTTP responses. The PayloadProcessor unconditionally inspects every HTTP response for specific JSON keys and passes base64/gzip/zlib-decoded values to exec(), enabling remote code execution on any system using the library.
- Disclosed
- Last updated
- Blast radius
- Any Python application using the reqcrypt library for HTTP requests
- Ecosystems
- Attack vectors
- Affected entities
- reqcryptPyPI package containing hidden backdoor for remote code execution
The reqcrypt package, distributed on PyPI as a general-purpose HTTP client library, contains deliberately concealed malicious functionality. The package's PayloadProcessor inspects every HTTP response for three specific JSON keys: 'payloaddd', 'payload_gz', and 'payload_zlib'.
When these keys are detected, the associated values are base64-decoded and decompressed (using gzip or zlib as appropriate), then passed directly to Python's exec() function within the caller's process. This decode-and-exec path is wired into the _process_response method, which is invoked from all public HTTP verbs (get, post, put, delete, patch, download, upload).
The malicious behavior is not disclosed in the package's advertised API. In-source comments label the execution sinks as 'Hidden execution', confirming intentional obfuscation. Any server the caller contacts—or any network attacker able to intercept and modify HTTP responses—can inject arbitrary Python code into the caller's process by adding one of the trigger keys to a JSON response body.
This represents a critical remote code execution vulnerability affecting any Python application that uses reqcrypt for HTTP communication.
Indicators of compromise
- Packages
- reqcrypt
Remediation
- Immediately uninstall the reqcrypt package from all systems
- Audit all systems that have used reqcrypt for signs of compromise or unauthorized code execution
- Review network logs and HTTP traffic from affected systems for suspicious JSON responses containing 'payloaddd', 'payload_gz', or 'payload_zlib' keys
- Replace reqcrypt with a legitimate, trusted HTTP client library such as requests or httpx
- Conduct a security review of any systems that contacted external servers while reqcrypt was installed
Sources
- GitHub Advisory GHSA-m6gg-ffj5-fxqh · GitHub Advisory Database
Cite this entry
"Malicious code in reqcrypt (PyPI)." supplychainattack.org, Supply Chain Attack Incident Catalog. Disclosed August 19, 2026; last updated August 19, 2026. https://supplychainattack.org/incident/malicious-code-in-reqcrypt-pypi-1jar94
Suggest a correction
Found an error or have a newer source? Corrections to factual errors take priority over new entries.
Related incidents
- containedcritical
Malicious code in mcp-search-server (PyPI)
mcp-search-server on PyPI contained malicious code in versions published from July 2026 onward. The package included hidden "phone home" functionality disguised as a "share compute swarm" feature, and was part of a coordinated campaign with another malicious package designed to deploy coin miners on user machines.
PyPICompromised packageMalicious maintainer - resolvedcritical
Malicious code in vtranalytic (PyPI)
The vtranalytic package on PyPI contained malicious code implementing a Telegram-bot-driven remote administration tool that provides full system control to an attacker holding the configured bot token. The package exfiltrates credentials, SSH keys, and arbitrary files via Telegram API, and executes arbitrary shell commands through a documented `run` command.
PyPICompromised packageMalicious maintainer - containedcritical
TeamPCP Injects Two-Stage Credential Stealer into xinference PyPI Package
The xinference package on PyPI was compromised with a two-stage credential stealer attributed to the TeamPCP threat actor. The malicious code was injected into the package, potentially affecting users who installed compromised versions.
TeamPCPPyPICompromised packageMalicious maintainer - containedhigh
lightning: Obfuscated JavaScript Credential Stealer Bundled in PyPI Wheel
The lightning PyPI package versions 2.6.2 and 2.6.3 were compromised on April 30, 2026, containing obfuscated JavaScript code designed to steal credentials. The project's GitHub account showed signs of compromise, with suspicious responses closing vulnerability reports.
Mini Shai HuludPyPICompromised packageMalicious maintainer