{"id":"MAL-2026-14341","summary":"Malicious code in reqcrypts (PyPI)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (7fb4e239b6344dfe684483344d4d1a2da013a4d506b78d81e9096c6b31a690ae)\nreqcrypts is published as a drop-in HTTP client (`import reqcrypts; reqcrypts.get(url)`) but its RequestHandler wraps every JSON response through a PayloadManager that base64-decodes a `_payload` field from the response body and passes it to `exec()` on the caller's Python interpreter, then deletes the field to hide the execution. Payload execution and silent mode are on by default. Any HTTP server the caller reaches (including MITM or redirect targets) can therefore run arbitrary Python code on the installer's host by returning a JSON body containing a `_payload` key. The package additionally exports top-level `add_payload(trigger, code)`, `set_default_payload(code)`, and `enable_payloads` helpers that store arbitrary Python source and feed it to the same `exec()` sink when a request endpoint matches the registered trigger, giving a second covert code-execution path. The docstring describes this as 'automatic silent payload execution'. Any application using reqcrypts as its HTTP client is exposed to remote code execution from any responding server.\n\n## Source: kam193 (516430200454879e0449beefe11b3981553ecb85df586ed09d8057ea94016c46)\nThe 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.\n\n\n---\n\nCategory: MALICIOUS - The campaign has clearly malicious intent, like infostealers.\n\n\nCampaign: 2026-08-reqcrypt\n\n\nReasons (based on the campaign):\n\n\n - backdoor\n","modified":"2026-08-21T05:01:52.443374943Z","published":"2026-08-21T02:17:41Z","database_specific":{"malicious-packages-origins":[{"sha256":"516430200454879e0449beefe11b3981553ecb85df586ed09d8057ea94016c46","source":"kam193","versions":["0.1.0","0.1.1","0.1.2","0.1.3"],"id":"pypi/2026-08-reqcrypt/reqcrypts","import_time":"2026-08-21T02:35:09.48742377Z","modified_time":"2026-08-21T02:17:41.984097Z"},{"source":"amazon-inspector","versions":["0.1.2"],"id":"IN-MAL-2026-018496","import_time":"2026-08-21T04:19:06.510580941Z","modified_time":"2026-08-21T04:15:10Z","sha256":"d53882b2c7d871e0f23318b5f65207af815ce41362267a935b5f9dfaa9c4fa9d"},{"sha256":"7fb4e239b6344dfe684483344d4d1a2da013a4d506b78d81e9096c6b31a690ae","source":"amazon-inspector","versions":["0.1.3"],"id":"IN-MAL-2026-018495","import_time":"2026-08-21T04:19:06.413880875Z","modified_time":"2026-08-21T04:15:01Z"}]},"references":[{"type":"WEB","url":"https://bad-packages.kam193.eu/pypi/package/reqcrypts"},{"type":"PACKAGE","url":"https://pypi.org/project/reqcrypts/0.1.2/"},{"type":"PACKAGE","url":"https://pypi.org/project/reqcrypts/0.1.3/"}],"affected":[{"package":{"name":"reqcrypts","ecosystem":"PyPI","purl":"pkg:pypi/reqcrypts"},"versions":["0.1.0","0.1.1","0.1.2","0.1.3"],"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":[{"sha256":"90c340d4c07a9ba8727e3caad6ec20a20eed105e489207c16c13f48022aeab2e","tlsh":"8722ec162a43f111cbdbc0749866de236b2f7c036a8c6134f6ec659caf15224e5f6ed8","path":"reqcrypts/__init__.py"}],"package_integrity":[{"hashes":{"md5":"ae9aa5037e74a2bc0fdc7d6218acbdca","sha256":"310ad82dae5795926de3cedeeacab9dadb4db1bbdb10dbd98339b0cb6a758453","blake2b_256":"cc61fe1f8b0084f269988cadda4860edb1a3776860dd2fbd30ea2f32d569dcc3"},"filename":"reqcrypts-0.1.2-py3-none-any.whl"},{"filename":"reqcrypts-0.1.2.tar.gz","hashes":{"md5":"ed8477030c3783db02346dc132002944","sha256":"cdb3aa784672babb848fbf90d056f1f3c35072aae182581627efa0f173ddca67","blake2b_256":"fcb236626b80a2c0b9e5382d75f48cc8e9dbec395918babc19b944f06713bd71"}}]},"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/pypi/reqcrypts/MAL-2026-14341.json"}}],"schema_version":"1.9.0","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"}]}