{"id":"MAL-2026-18435","summary":"Malicious code in privacypass-py (PyPI)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (0ca6e88317dac5ec524d2dc6ec4b2af7934e2213569ed7c8a757e59edb45b0c3)\nThe package presents itself as 'Privacy Pass client primitives' but ships no cryptographic functionality. Its only runtime effect is a data-exfiltration beacon. setup.py invokes a `_report()` routine during build/install that collects hostname, username, current working directory, argv, the parent process command line read from /proc/\u003cppid\u003e/cmdline, and environment variable names and values matching credential-related prefixes (AWS_, GITHUB_, PIP_, and others), then POSTs the JSON payload to the hardcoded bare-IP endpoint http://85.190.112.236:8881/b/\u003cnonce\u003e over plain HTTP. privacypass_py/__init__.py repeats the same beacon at module top level, calling `_report('import')` on every `import privacypass_py` with an expanded prefix list (CLOUDFLARE_, SUPERTOKENS, HOME, USER, PATH) and an additional `secretish_names` list filtered by substrings KEY/SECRET/TOKEN/PASS/CRED/PRIVATE/SEED/MNEMONIC/SIGNATURE/COOKIE/SESSION/AUTH, sent to http://85.190.112.236:8881/f/\u003cnonce\u003e. The import-time path fires outside pip build isolation. The name and description function as cover for a package whose only shipped code is the beacon.\n\n## Source: kam193 (1c4699b191565636c74fc5e6e8ece237bb0186ca11f021298ac91b2931756c09)\nInstalling the package or importing the module exfiltrates basic information about the host, and the package has no other purpose.\n\n\n---\n\nCategory: PROBABLY_PENTEST - Packages looking like typical pentest packages, but also anything that looks like testing, exploring pre-prepared kits, research & co, with clearly low-harm possibilities.\n\n\nCampaign: GENERIC-standard-pypi-install-pentest\n\n\nReasons (based on the campaign):\n\n\n - The package contains code to exfiltrate basic data from the system, like IP or username. It has a limited risk.\n\n\n - The package overrides the install command in setup.py to execute malicious code during installation.\n","modified":"2026-11-01T09:45:03.305960502Z","published":"2026-11-01T08:01:23Z","database_specific":{"malicious-packages-origins":[{"sha256":"0ca6e88317dac5ec524d2dc6ec4b2af7934e2213569ed7c8a757e59edb45b0c3","source":"amazon-inspector","versions":["0.1.101"],"id":"IN-MAL-2026-022471","import_time":"2026-11-01T08:14:47.241746113Z","modified_time":"2026-11-01T08:01:23Z"},{"versions":["0.1.99","0.1.100","0.1.101"],"id":"pypi/GENERIC-standard-pypi-install-pentest/privacypass-py","import_time":"2026-11-01T09:35:59.414959083Z","modified_time":"2026-11-01T09:03:03.776904Z","sha256":"1c4699b191565636c74fc5e6e8ece237bb0186ca11f021298ac91b2931756c09","source":"kam193"}]},"references":[{"type":"PACKAGE","url":"https://pypi.org/project/privacypass-py/0.1.101/"},{"type":"WEB","url":"https://bad-packages.kam193.eu/pypi/package/privacypass-py"}],"affected":[{"package":{"name":"privacypass-py","ecosystem":"PyPI","purl":"pkg:pypi/privacypass-py"},"versions":["0.1.101","0.1.99","0.1.100"],"database_specific":{"indicators":{"evidence_files":[{"tlsh":"9f415490ef227c7282d605096828459473bab90f2aa17474f6de23752f9e03982f3e56","path":"setup.py","sha256":"cea0614f670c026bcdd5bc600a13e5463c28d46412c242cd38739bcfee596810"},{"path":"privacypass_py/__init__.py","sha256":"4862a75e16b2e466f28ba5d71ee6097729502ac5e9294ebbdd0f069004ff5c96","tlsh":"f7515290ed229d33c29f411e2c1448e0333af40f36556535bacd2678af9d02d52f2d9a"}],"package_integrity":[{"hashes":{"md5":"e6c7c197293a5ae366da64052d704a35","sha256":"2427b1b03b2bdb8deab5d0d3d56273e462c59ff0d64f3134ff128745d69ecff3","blake2b_256":"29851396f302ddcb3f730480a1de58a24b39982843a6aed068c33011cd3fd35e"},"filename":"privacypass_py-0.1.101.tar.gz"}]},"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/pypi/privacypass-py/MAL-2026-18435.json","cwes":[{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"}]}}],"schema_version":"1.9.2","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"}]}