pypi · Malicious package advisory
Malwarepydefender
GHSA-cjgj-r9j5-8hwf
Malicious code in pydefender (PyPI)
Details
**Severity:** Critical **Affected versions:** `= 0.0.1` ## Source: kam193 (a1e2cc2d94eff74e302118c35c34f87e76175fe507facbe21c29883960c8223e) setup.py is prepared to download and run an obfuscated batch script. While the script is not detected by any AV currently, in the sandbox analysis it reveals behaviour like adding exclusions to Windows Defender --- Category: MALICIOUS - The campaign has clearly malicious intent, like infostealers. Campaign: 2025-02-pydefender Reasons (based on the campaign): - Downloads and executes a remote malicious script. - malware - The package overrides the install command in setup.py to execute malicious code during installation. --- Credit: [OpenSSF](https://github.com/ossf/malicious-packages) ([source](https://github.com/ossf/malicious-packages/blob/49d0cfba3689ed9b195d101d3a2a964c6a77f767/osv/malicious/pypi/pydefender/MAL-2025-191833.json)) **References:** - https://app.any.run/tasks/0fbdb4f9-0497-4272-baf0-872e8d6e50bc - https://bad-packages.kam193.eu/pypi/package/pydefender - https://github.com/ossf/malicious-packages/blob/49d0cfba3689ed9b195d101d3a2a964c6a77f767/osv/malicious/pypi/pydefender/MAL-2025-191833.json - https://tria.ge/250301-sdh1pstrz7/behavioral1 - https://www.virustotal.com/gui/file/0877653f6a24639bb02b547c94f670597c3c0cd96df910a2ac891eaeaa9cc5f3/behavior - https://github.com/advisories/GHSA-cjgj-r9j5-8hwf
Compromised versions (1)
- = 0.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.