{"id":"MAL-2026-11202","summary":"Malicious code in ml-shared (PyPI)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (89a726ddb6cfd4ce7da05b1b8c75e896e38789aa418c71d4db76f499b5727cb3)\nsetup.py defines a function named analytics() that collects the installer's hostname, username, current working directory, and the entire process environment (dict(os.environ)) and POSTs it as JSON to https://request-forwarder.a-d-a-m.workers.dev/. The routine fires both at module top-level (executed during pip's build/install of the sdist) and via a PostInstallCommand hooked into cmdclass={'install':...}, so it runs on pip install without user interaction. On CI/build agents the bulk os.environ dump routinely contains credentials such as AWS_*, GITHUB_TOKEN, NPM_TOKEN, PYPI_TOKEN, and other secret-shaped variables. The destination is an anonymous Cloudflare Workers subdomain unrelated to any declared publisher, the function is named analytics as a cover, and code lines are padded with trailing whitespace consistent with evasion of casual review.\n\n## Source: kam193 (4f4ae8fee891c54953efa7c796a605e700fc827131feff0243f0b3bc8bd6a260)\nDuring installation, package exfiltrates basic info and all environmental variables.\n\n\n---\n\nCategory: MALICIOUS - The campaign has clearly malicious intent, like infostealers.\n\n\nCampaign: 2026-07-ml-shared\n\n\nReasons (based on the campaign):\n\n\n - exfiltration-env-variables\n\n\n - The package contains code to exfiltrate basic data from the system, like IP or username. It has a limited risk.\n","modified":"2026-08-04T22:05:25.958055841Z","published":"2026-07-30T21:43:14Z","database_specific":{"iocs":{"domains":["request-forwarder.a-d-a-m.workers.dev"]},"malicious-packages-origins":[{"modified_time":"2026-07-30T21:43:14.726583Z","sha256":"4f4ae8fee891c54953efa7c796a605e700fc827131feff0243f0b3bc8bd6a260","source":"kam193","versions":["6.3.0","8.8.0"],"id":"pypi/2026-07-ml-shared/ml-shared","import_time":"2026-07-30T21:58:25.192879919Z"},{"import_time":"2026-08-04T21:33:15.898510541Z","modified_time":"2026-08-04T21:28:29Z","sha256":"1ba1dc0bbc1690cd8c43d159eeb9306837b653cb92d6ed9eed9d14dd115a9990","source":"amazon-inspector","versions":["6.3.0"],"id":"IN-MAL-2026-011072"},{"versions":["8.8.0"],"id":"IN-MAL-2026-011089","import_time":"2026-08-04T21:33:16.42240729Z","modified_time":"2026-08-04T21:30:56Z","sha256":"89a726ddb6cfd4ce7da05b1b8c75e896e38789aa418c71d4db76f499b5727cb3","source":"amazon-inspector"}]},"references":[{"type":"WEB","url":"https://bad-packages.kam193.eu/pypi/package/ml-shared"},{"type":"PACKAGE","url":"https://pypi.org/project/ml-shared/6.3.0/"},{"type":"PACKAGE","url":"https://pypi.org/project/ml-shared/8.8.0/"}],"affected":[{"package":{"name":"ml-shared","ecosystem":"PyPI","purl":"pkg:pypi/ml-shared"},"versions":["6.3.0","8.8.0"],"database_specific":{"cwes":[{"name":"Embedded Malicious Code","cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature."},{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"}],"indicators":{"package_integrity":[{"filename":"ml_shared-6.3.0.tar.gz","hashes":{"blake2b_256":"5a3ab3401a47a7deace4c8f97d9678f4fca0827ac4ad72c43a1d60a9a02c41cc","md5":"5bf632ec7503afa1dd9619d481877b30","sha256":"0376c946027fb44a1c09ec05bb7f4e567f9db2b03c22484afc0555ea8956700a"}}],"evidence_files":[{"path":"setup.py","sha256":"e2c924192e2fc21e1a5aff50a700c5b2a5f3f8a25b76ed156b07a54e56d5d7fd","tlsh":"2af1330bed727810ea47503d19e69600b3aa6a37160064b47dedc76c5f86537cebdb8c"}]},"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/pypi/ml-shared/MAL-2026-11202.json"}}],"schema_version":"1.8.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"}]}