{"id":"MAL-2026-5284","summary":"Malicious code in synago (PyPI)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (a3e1bae7957cb735edd8424c1d2efe54b597c3a484ba77c9239e9ff8ec06327f)\nThe package installs synago-setup.pth, which Python auto-executes on every interpreter startup (not only on `import synago`). The.pth contains an obfuscated single-line `exec()` string with single-letter import aliases (`_o`, `_s`, `_u`, `_p`, `_y`, `_b`, `_j`, `_z`, `_zf`) gated by a `/tmp/.bun_ran` sentinel so it runs only once per machine. On first run it fetches `https://github.com/oven-sh/bun/releases/download/bun-v1.3.13/bun-{os}-{arch}.zip` via urllib, unzips it to `/tmp/b/bun`, chmods the binary executable (mode 509 / 0o775), deletes the zip, and invokes `subprocess.run([bun, 'run', _index.js])` against a JavaScript file shipped in the package. The package advertises itself as an LLM agent framework — there is no legitimate reason for it to install a `.pth` hook, fetch an alternate language runtime, stage it under `/tmp`, and execute bundled JavaScript at every Python invocation. The combination of `.pth` auto-execution (a vector that bypasses normal `import` sandboxes), obfuscated `exec()` of a quoted string, sentinel-based once-per-host gating to evade re-detonation, and an out-of-band runtime executing code that Python-only scanners will not inspect is the alternate-runtime dropper pattern. Installing this package causes arbitrary attacker-controlled JavaScript to execute on the installer's machine on every subsequent Python startup.\n\n## Source: kam193 (bee487bb185457ca9e9d74e0963e23be3e84241a6bcd7d0bd5ca44855dd7d28b)\nVersions 0.1.1, 0.1.2 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:52.283549805Z","published":"2026-06-06T06:13:57Z","database_specific":{"malicious-packages-origins":[{"sha256":"bee487bb185457ca9e9d74e0963e23be3e84241a6bcd7d0bd5ca44855dd7d28b","source":"kam193","modified_time":"2026-06-06T06:13:57Z","versions":["0.1.1","0.1.2"],"id":"pypi/2026-06-compr-woodpecker/synago","import_time":"2026-06-06T07:59:00.777178025Z"},{"sha256":"533fa27d8d714f6deff7c7ef649fd0470cedddda7875a237a9d6556dd41be21f","source":"kam193","modified_time":"2026-06-06T06:13:57Z","versions":["0.1.1","0.1.2"],"id":"pypi/2026-06-compr-woodpecker/synago","import_time":"2026-06-08T11:41:02.542882557Z"},{"sha256":"32e54d80f1aaab5e054ae1f4391c0c4cb90da1c621473f498b7f61f319aba409","source":"kam193","modified_time":"2026-06-06T06:34:55Z","versions":["0.1.1","0.1.2"],"id":"pypi/2026-06-compr-woodpecker/synago","import_time":"2026-06-08T19:19:19.198945872Z"},{"sha256":"4d1416aa89571f0126ab0764fb1c1afc949819db86e83e30171781a9cc1add64","source":"kam193","modified_time":"2026-06-06T06:34:55Z","versions":["0.1.1","0.1.2"],"id":"pypi/2026-06-compr-woodpecker/synago","import_time":"2026-06-09T07:48:29.655826134Z"},{"sha256":"a3e1bae7957cb735edd8424c1d2efe54b597c3a484ba77c9239e9ff8ec06327f","source":"amazon-inspector","modified_time":"2026-06-12T19:09:33Z","versions":["0.1.1"],"id":"IN-MAL-2026-006126","import_time":"2026-06-12T19:44:10.993532721Z"}]},"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/synago/0.1.1/"}],"affected":[{"package":{"name":"synago","ecosystem":"PyPI","purl":"pkg:pypi/synago"},"versions":["0.1.1","0.1.2"],"database_specific":{"indicators":{"evidence_files":[{"sha256":"c539766062555d47716f8432e73adbe3a0c0c954a0b6c4005017a668975e275c","path":"synago-setup.pth","tlsh":"4911c02e429385b0d975d646830b19f4afdb8ce28fc79506c8d8d4c1a7b2e50e3b7684"}],"package_integrity":[{"hashes":{"sha256":"dc98c8cfc903058aa5ebda632e7f1306a42fbdcf863d84e0b95f5a6e3e6e847a","blake2b_256":"15838ee95a19f0ca591aaabd405a7faee345890a754963850bc0f3334c8f36f2","md5":"fbffb3296d4f8374836f9ac9d2ccde50"},"filename":"synago-0.1.1-py3-none-any.whl"}]},"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/pypi/synago/MAL-2026-5284.json","cwes":[{"name":"Embedded Malicious Code","cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature."}]}}],"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"}]}