pypi · Malicious package advisory
Malwaremainx
GHSA-3342-5jgg-8h7h
Malicious code in mainx (PyPI)
Details
**Severity:** Critical **Affected versions:** `= 0.1` ## Source: kam193 (6a77aad2f42165ec9582f04fffab948f6a1125564e34f4d09c8d089b2708d8d2) While described as educational package to simulate post-exploitation environment, the malware is active and once started, automatically attempts to exfiltrate sensitive data (credentials, cookies, etc.) and places a Discord implant. The remote target is hard coded in the code. --- Category: MALICIOUS - The campaign has clearly malicious intent, like infostealers. Campaign: 2025-06-mainx Reasons (based on the campaign): - obfuscation - infostealer - files-exfiltration - exfiltration-credentials - exfiltration-browser-data - peristence-autorun - The package contains code to detect if it is running in a sandbox environment. --- Credit: [OpenSSF](https://github.com/ossf/malicious-packages) ([source](https://github.com/ossf/malicious-packages/blob/49d0cfba3689ed9b195d101d3a2a964c6a77f767/osv/malicious/pypi/mainx/MAL-2025-6540.json)) **References:** - https://bad-packages.kam193.eu/pypi/package/mainx - https://github.com/ossf/malicious-packages/blob/49d0cfba3689ed9b195d101d3a2a964c6a77f767/osv/malicious/pypi/mainx/MAL-2025-6540.json - https://www.sonatype.com/blog/sonatype-uncovers-global-espionage-campaign-in-open-source-ecosystems - https://github.com/advisories/GHSA-3342-5jgg-8h7h
Compromised versions (1)
- = 0.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.