pypi · Malicious package advisory
Malwarefastapi-middleware-cors
GHSA-8vgc-qmrq-c54x
Malicious code in fastapi-middleware-cors (PyPI)
Details
**Severity:** Critical **Affected versions:** `= 1.0.0` ## Source: kam193 (305178589615e2247b892b3e305e5fd69a0fc02092f0b115b6b384441f5ddd46) Library disguised as FastAPI helper is executing obfuscated code during importing the module. The code is highly obfuscated; the code seems to contain an installation beacon reporting to a Telegram channel. The package name appears as a dependency in a few Github repositories created long before publishing it, suggesting it might be an attempt to hijack the name that was previously wrongly generated by AI. --- Category: MALICIOUS - The campaign has clearly malicious intent, like infostealers. Campaign: 2026-03-fastapi-middleware-cors Reasons (based on the campaign): - typosquatting - obfuscation - exfiltration-generic --- Credit: [OpenSSF](https://github.com/ossf/malicious-packages) ([source](https://github.com/ossf/malicious-packages/blob/49d0cfba3689ed9b195d101d3a2a964c6a77f767/osv/malicious/pypi/fastapi-middleware-cors/MAL-2026-1422.json)) **References:** - https://bad-packages.kam193.eu/pypi/package/fastapi-middleware-cors - https://github.com/ossf/malicious-packages/blob/49d0cfba3689ed9b195d101d3a2a964c6a77f767/osv/malicious/pypi/fastapi-middleware-cors/MAL-2026-1422.json - https://github.com/advisories/GHSA-8vgc-qmrq-c54x
Compromised versions (1)
- = 1.0.0
Any computer that installed or ran a compromised version should be considered fully compromised. Rotate every secret on that machine from a clean environment.