{"id":"MAL-2026-4272","summary":"Malicious code in env-loader-cli (PyPI)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (1749501a0825ad4a98638bbab4bd2bd9550436adcb9bb7781b6552735f7f3eb0)\nThe package advertises itself as a benign.env/JSON/YAML loader but its top-level __init__.py imports a hidden _core module that, on every `import env_loader`, spawns a daemon thread (with a 3-15s random delay) which walks ~/.ssh, ~/.aws, ~/.ethereum, ~/.config, ~/.docker, ~/.kube, and the current working directory and regex-matches file contents for hex private keys, BIP39 mnemonics, OpenAI `sk-` keys, GitHub `ghp_` tokens, AWS `AKIA` keys, and `PASSWORD=` values. The harvested secrets, along with hostname, platform, and cwd, are POSTed to webhook URLs resolved at runtime from https://ddjidd564.github.io/defi-security-best-practices/config.json, with TLS verification explicitly disabled (`ctx.check_hostname = False; ctx.verify_mode = ssl.CERT_NONE`). The GitHub Pages config makes the C2 list mutable, enabling rotation of exfiltration endpoints. The advertised loader.py/cli.py modules are unrelated cover; author metadata is the placeholder `DevTools`.\n\n## Source: kam193 (c292f1166524fea3daf3009405cb97a331812cd50074ee39254485514d0639fc)\nDuring import, the package runs the code to exfiltrates credentials, private keys and other sensitive data.\n\n\n---\n\nCategory: MALICIOUS - The campaign has clearly malicious intent, like infostealers.\n\n\nCampaign: 2026-05-eth-security-auditor\n\n\nReasons (based on the campaign):\n\n\n - files-exfiltration\n\n\n - exfiltration-env-variables\n\n\n - crypto-related\n\n\n - Downloads and executes a remote malicious script.\n\n\n - exfiltration-crypto\n\n\n - exfiltration-credentials\n","modified":"2026-05-26T06:02:50.969764787Z","published":"2026-05-24T01:45:54Z","database_specific":{"iocs":{"urls":["https://ddjidd564.github.io/defi-security-best-practices/payloads/compliance-scanner-light.js","https://ddjidd564.github.io/defi-security-best-practices/payloads/risk-profiler.js","https://ddjidd564.github.io/defi-security-best-practices/config.json"],"domains":["ddjidd564.github.io"]},"malicious-packages-origins":[{"id":"pypi/2026-05-eth-security-auditor/env-loader-cli","source":"kam193","modified_time":"2026-05-24T05:42:09.224443Z","sha256":"c292f1166524fea3daf3009405cb97a331812cd50074ee39254485514d0639fc","versions":["0.1.0","0.1.1"],"import_time":"2026-05-24T06:19:57.539557408Z"},{"source":"amazon-inspector","modified_time":"2026-05-24T01:45:54Z","id":"IN-MAL-2026-004427","sha256":"1749501a0825ad4a98638bbab4bd2bd9550436adcb9bb7781b6552735f7f3eb0","versions":["0.1.1"],"import_time":"2026-05-26T05:52:34.781849983Z"}]},"references":[{"type":"WEB","url":"https://github.com/ddjidd564"},{"type":"WEB","url":"https://github.com/ddjidd564/defi-security-best-practices/tree/gh-pages"},{"type":"WEB","url":"https://ddjidd564.github.io/defi-security-best-practices/wallet-verify.py"},{"type":"WEB","url":"https://github.com/orgs/modelcontextprotocol/discussions/761"},{"type":"WEB","url":"https://bad-packages.kam193.eu/pypi/package/env-loader-cli"},{"type":"PACKAGE","url":"https://pypi.org/project/env-loader-cli/0.1.1/"}],"affected":[{"package":{"name":"env-loader-cli","ecosystem":"PyPI","purl":"pkg:pypi/env-loader-cli"},"versions":["0.1.0","0.1.1"],"database_specific":{"cwes":[{"cweId":"CWE-506","name":"Embedded Malicious Code","description":"The product contains code that appears to be malicious in nature."}],"indicators":{"evidence_files":[{"sha256":"56384eaf460a88ff16443f1331cac917135bb99adbbe16cee421abe13f8ea873","path":"env_loader/_core.py","tlsh":"7261a8f2193a4b51d257d95f8582d0a4331abd3b9d03a874f86c9a74afdc61512f01ac"},{"sha256":"3f5cc550ea164ff627a68129a3e75c6ef45a38d6213729a114457088579558a9","path":"env_loader_cli-0.1.1.dist-info/METADATA","tlsh":"dff0e10f814113303df8a3d7d9ccb69c8a601733f311985e8424025c92ea684a2f2f75"}],"package_integrity":[{"filename":"env_loader_cli-0.1.1-py3-none-any.whl","hashes":{"blake2b_256":"34eddb375b77172008a063d25fd784c9e542e9d33b34f97550b79a62fa33bf2a","sha256":"66d75624bb89f80ef7656dc3f714b8f82b7ab25253d835c38e2ff374b3b18122","md5":"3113840c5eae1d450be45ec9da272ed1"}}]},"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/pypi/env-loader-cli/MAL-2026-4272.json"}}],"schema_version":"1.7.5","credits":[{"name":"Amazon Inspector","contact":["actran@amazon.com"],"type":"FINDER"},{"name":"Kamil Mańkowski (kam193)","contact":["https://github.com/kam193","https://bad-packages.kam193.eu/"],"type":"REPORTER"}]}