{"id":"MAL-2026-5277","summary":"Malicious code in pantheon-toolsets (PyPI)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (a3f2d24843d0caf23a36f07f7bd7b3adb7163463404856654f1745c7e75017be)\nThe wheel installs pantheon_toolsets-setup.pth, which Python automatically executes at every interpreter startup (before any user import). The.pth contains a single obfuscated line using single-letter underscore-prefixed identifiers (_O, _T, _G, _o, _s, _u, _b, _a, _m, _z,...) and wraps the payload inside exec() of a string literal — a shape that has no legitimate use in a.pth file (which is normally limited to plain import statements / sys.path entries). The exec'd code: (1) checks a sentinel /tmp/.bun_ran to ensure one-shot execution, (2) downloads the Bun JavaScript runtime from https://github.com/oven-sh/bun/releases/download/bun-v1.3.13/bun-{platform}-{arch}.zip into /tmp/b/bun, (3) glob-searches the install tree for any *_index.js* file, and (4) runs it via subprocess with `bun run \u003cglobbed_index.js\u003e`. The package is advertised as a Python AI-agent toolset and has no documented need for an alternate JavaScript runtime. The globbed _index.js payload is not declared in the wheel manifest and is fetched/staged opaquely, so the bytes ultimately executed are not auditable from the package metadata. Additional tampering fingerprint: the 0.5.5 RECORD references a 0.5.4 dist-info directory and lists its own RECORD with the empty-string SHA-256 and zero size, consistent with a malicious file appended to an otherwise legitimate build by someone with publish credentials. Installing this package causes arbitrary attacker-stageable code to run with the user's privileges every time `python` is invoked.\n\n## Source: kam193 (9c9711927907f09a0ef2b146d3aba3b8a06197b9af3f639d579015cdab7c0d5d)\nVersions 0.5.5, 0.5.6 were compromised.\n\n\nCompromised packages start an obfuscated infostealer. The infostealer is a heavily obfuscated JavaScript code executed using Bun runtime on Python startup. It collectes all kinds of sensitive data, including API keys, credentials to package repositories, cryptocurrency assets, password manager data. Infostealer actively queries online services to collect additional secrets as well as attempts to gain persistence and spread further by publishing infected packages using collected credentials. Data are exfiltrated likely using Github. The code seems to threaten to wipe the user's data if it detects invalid GitHub tokens. Cleanup should be done with caution.\n\nIt seems to be related to the recent Mini Shai Hulud campaign.\n\n\n---\n\nCategory: MALICIOUS - The campaign has clearly malicious intent, like infostealers.\n\n\nCampaign: 2026-06-compr-woodpecker\n\n\nReasons (based on the campaign):\n\n\n - compromised-package\n\n\n - exfiltration-env-variables\n\n\n - exfiltration-cloud-tokens\n\n\n - exfiltration-credentials\n\n\n - abuses-pth\n\n\n - obfuscation\n\n\n - infostealer\n\n\n - The package contains code to detect if it is running in a sandbox environment.\n\n\n - exfiltration-crypto\n\n\n - files-exfiltration\n\n\n - destructive-actions\n","modified":"2026-06-12T20:01:50.722609781Z","published":"2026-06-06T06:13:57Z","database_specific":{"malicious-packages-origins":[{"sha256":"9c9711927907f09a0ef2b146d3aba3b8a06197b9af3f639d579015cdab7c0d5d","source":"kam193","modified_time":"2026-06-06T06:13:57Z","versions":["0.5.5","0.5.6"],"id":"pypi/2026-06-compr-woodpecker/pantheon-toolsets","import_time":"2026-06-06T06:39:40.987016518Z"},{"sha256":"da03533f5773391b407c22d0024023d206ae96cea73fcd0d05cb2e0b5559e4dc","source":"kam193","modified_time":"2026-06-06T06:13:57Z","versions":["0.5.5","0.5.6"],"id":"pypi/2026-06-compr-woodpecker/pantheon-toolsets","import_time":"2026-06-08T11:41:02.53777705Z"},{"source":"kam193","import_time":"2026-06-08T19:19:19.193124691Z","modified_time":"2026-06-06T06:18:06Z","versions":["0.5.5","0.5.6"],"id":"pypi/2026-06-compr-woodpecker/pantheon-toolsets","sha256":"d3b47973a9df4b3f64f94ea3d91063d428a7212d369981f036301c5aadc4e2ac"},{"source":"kam193","import_time":"2026-06-09T07:48:29.651067575Z","modified_time":"2026-06-06T06:18:06Z","versions":["0.5.5","0.5.6"],"id":"pypi/2026-06-compr-woodpecker/pantheon-toolsets","sha256":"43606844907760e50b0a368f20365dc747287c3a73ce5d4b4426f575d852e059"},{"sha256":"a3f2d24843d0caf23a36f07f7bd7b3adb7163463404856654f1745c7e75017be","source":"amazon-inspector","modified_time":"2026-06-12T19:03:00Z","id":"IN-MAL-2026-005837","versions":["0.5.5"],"import_time":"2026-06-12T19:43:38.63263662Z"}]},"references":[{"type":"WEB","url":"https://socket.dev/blog/mini-shai-hulud-campaign-hits-red-hat-cloud-services-npm-packages"},{"type":"WEB","url":"https://bad-packages.kam193.eu/pypi/campaign/2026-06-compr-woodpecker"},{"type":"WEB","url":"https://socket.dev/blog/shai-hulud-descends-to-hades-miasma-pypi-wave"},{"type":"WEB","url":"https://o3.security/blog/pypi-supply-chain-attack-pth-file-miasma"},{"type":"WEB","url":"https://socket.dev/blog/mini-shai-hulud-miasma-and-hades-worms-target-bioinformatics-and-mcp-developers-via-malicious"},{"type":"PACKAGE","url":"https://pypi.org/project/pantheon-toolsets/0.5.5/"}],"affected":[{"package":{"name":"pantheon-toolsets","ecosystem":"PyPI","purl":"pkg:pypi/pantheon-toolsets"},"versions":["0.5.5","0.5.6"],"database_specific":{"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/pypi/pantheon-toolsets/MAL-2026-5277.json","indicators":{"package_integrity":[{"filename":"pantheon_toolsets-0.5.5-py3-none-any.whl","hashes":{"blake2b_256":"31bf6cb983b6a00f1f2a2955d683ebdae4406893fad28ae8f98f1cdcf6e0bab4","sha256":"48fdd5ad168e5b909b37b70c1d7cdf4c9585879c3e1b08d26d1697ac593c6458","md5":"5b045fe9e3f84b0bb80ae9edb69db078"}}],"evidence_files":[{"sha256":"c539766062555d47716f8432e73adbe3a0c0c954a0b6c4005017a668975e275c","path":"pantheon_toolsets-setup.pth","tlsh":"4911c02e429385b0d975d646830b19f4afdb8ce28fc79506c8d8d4c1a7b2e50e3b7684"},{"sha256":"37a47fd658b21fc315d2f0891cc17842437c69d6ba15611cc3b0d9c7ae66d920","path":"pantheon_toolsets-0.5.5.dist-info/RECORD","tlsh":"10e203588bbdc70a57741654d371d3f1b8b4aa5232c280bab30899e5029fee8fd31b75"}]},"cwes":[{"name":"Embedded Malicious Code","description":"The product contains code that appears to be malicious in nature.","cweId":"CWE-506"}]}}],"schema_version":"1.7.5","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"}]}