pypi · Malicious package advisory
Malwarecodeoptimizer
GHSA-xr94-7c4j-2j88
Malicious code in codeoptimizer (PyPI)
Details
**Severity:** Critical **Affected versions:** `= 4.1.1` ## Source: kam193 (7ae236bbeace8d7b056d4827059bc1f4b6314e57e75827ce5a980ac9dfb991c2) On importing the module, there is an automated start of a Telegram bot capable of exfiltrating passwords from browsers, executing arbitrary commands and so on. While the description states it's a monitoring tool, the automated start, capabilities targeting secret values suggest malicious intentions. --- Category: MALICIOUS - The campaign has clearly malicious intent, like infostealers. Campaign: 2025-03-yolov8mini Reasons (based on the campaign): - infostealer - exfiltration-generic - dependency-confusion - exfiltration-browser-data - The package contains code to execute remote commands (probably limited to a specific set) on the victim's machine. --- Credit: [OpenSSF](https://github.com/ossf/malicious-packages) ([source](https://github.com/ossf/malicious-packages/blob/49d0cfba3689ed9b195d101d3a2a964c6a77f767/osv/malicious/pypi/codeoptimizer/MAL-2025-3440.json)) **References:** - https://bad-packages.kam193.eu/pypi/package/codeoptimizer - https://github.com/ossf/malicious-packages/blob/49d0cfba3689ed9b195d101d3a2a964c6a77f767/osv/malicious/pypi/codeoptimizer/MAL-2025-3440.json - https://github.com/advisories/GHSA-xr94-7c4j-2j88
Compromised versions (1)
- = 4.1.1
Any computer that installed or ran a compromised version should be considered fully compromised. Rotate every secret on that machine from a clean environment.