{"id":"MAL-2026-18298","title":"Malicious code in claudeopusfile (PyPI)","summary":"Malicious code in claudeopusfile (PyPI)","severity":"critical","exploited":true,"vendor":"claudeopusfile","product":"claudeopusfile","ecosystem":"pip","affected":["claudeopusfile"],"published":"2026-10-25","updated":"2026-10-26","sourceUpdated":"2026-10-26T06:45:15.843384220Z","source":"OSV","sourceUrl":"https://osv.dev/vulnerability/MAL-2026-18298","references":[{"url":"https://www.virustotal.com/gui/file/d03c42c275f0dbc617428441508c49ae1adcbbc95af4eeb094bca4e4f8943f3e/detection"},{"url":"https://polygonscan.com/address/0x9c0a507300fd902787bb193d80fca5ce6e1bff9a"},{"url":"https://bad-packages.kam193.eu/pypi/package/claudeopusfile"},{"url":"https://pypi.org/project/claudeopusfile/0.1.2/"},{"url":"https://pypi.org/project/claudeopusfile/0.1.1/"}],"tags":["osv","pip","malware"],"ingestedAt":"2026-10-26T12:01:30.294Z","slug":"MAL-2026-18298","body":"## Overview\n\n\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (de2f0d45d8a2c0489d082d86a91c63fc5cad53f891b3dd1e976cd7479344c65f)\nsetup.py imports claudeopusfile.compat._ensure_compat during pip install. compat.py constructs the string 'exec' from a chr-code tuple (chr(101),chr(120),chr(101),chr(99)) and invokes it via getattr(builtins, _RUN)(compile(code, '<claudeopusfile-compat>', 'exec'),...) on content produced by zlib.decompress(base64.b85decode(_shimdata.DATA)) — an opaque base85+zlib blob shipped in claudeopusfile/_shimdata.py. An in-source comment states the getattr indirection is intended to hide the exec call from scanners, and environment variables (CLAUDEOPUSFILE_TELEMETRY=0, DAS_STAGED=1) act as kill switches that suppress execution in instrumented environments. The package additionally ships claudeopusfile/_payload.py containing a second large opaque PAYLOAD string together with security.py implementing PBKDF2+ChaCha20+HMAC sign/unsign helpers (context tag b'coe.'), providing a signed-channel decryption path for a staged second payload. Decoded content runs with the installer's privileges on `pip install`. The package's advertised purpose (prompt-generator utility) has no need to decode and execute an opaque blob at install time.\n\n## Source: kam193 (9a776d104d66cbeec1283bd7a7e9decc15da19a1946dd27c7d7ca632a6cdc2f2)\nDuring installation, obfuscated code is used to fetch code hidden in an image containing a Python application with a native extension module. This module holds an obfuscated infostealer which collects sensitive data and exfiltrates them to a C2 server retrieved from transaction history in the Polygon blockchain.\n\n\n---\n\nCategory: MALICIOUS - The campaign has clearly malicious intent, like infostealers.\n\n\nCampaign: 2026-09-donutautosellsrc\n\n\nReasons (based on the campaign):\n\n\n - infostealer\n\n\n - Downloads and executes a remote executable.\n\n\n - obfuscation\n\n\n - The package contains code to detect if it is running in a sandbox environment.\n\n\n - malware\n\n\n - native-extension\n\n\n - steganography\n\n\n - c2-in-blockchain\n\n\n## Affected packages\n\n- `claudeopusfile`\n\n## Remediation\n\nRefer to the advisory for the patched release.","depth":"abyssal","depthScore":70,"depthScoreParts":{"impact":52.3,"likelihood":0,"exploitation":18,"ransomware":0},"changes":[]}