Malicious package · PyPI
Malicious code in reqcrypt-dev (PyPI)
0.1.0No safe version. Remove it.What it does
The package presents itself as a requests-style HTTP client but its response processor inspects every JSON response for the magic keys payloaddd, payload_gz, and payload_zlib. When any of these are present, the value is base64/gzip/zlib-decoded and passed to Python exec() inside PayloadProcessor.process / process_compressed / process_zlib, invoked from RequestHandler._process_response on every JSON response. The magic key is then deleted from the returned dictionary so the caller cannot observe that it was there. Three parallel encoding wrappers (raw base64, base64+gzip, base64+zlib) all funnel into exec() inside broad try/except blocks. A source comment literally labels the branch # Hidden execution. Any HTTP endpoint reached via reqcrypt.get/post/put/... — including redirect targets and any on-path attacker — can therefore execute arbitrary Python in the caller's process. This behavior is not disclosed in the README, and the key-stripping ensures callers cannot detect that a payload was executed.
Reported by kam193 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.
No fix · Remove and contain
pip uninstall reqcrypt-devSources