fastapii (PyPI) · Malicious Code
Affects fastapiiSource GCVE Database
Malicious package : remove fastapii and rotate any secrets on hosts that installed it.
Data as of 7 Aug 2026, 15:40 UTC
Malicious package
Published to PyPI · OSV MAL-2026-13486
What to do
Remove fastapii from every project, lockfile and image that pulls it in. Treat any host that installed it as compromised: rotate the credentials, tokens and keys it could read, from a clean machine.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| PyPIfastapii | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
Description
The fastapii package on PyPI is a malicious typosquatting package impersonating the popular fastapi library. During installation, it executes obfuscated code that downloads and runs a remote binary on Linux systems. This binary is fetched from an unrelated GitHub account without verification, and the package's real behavior is to drop and execute this payload. The payload reportedly exfiltrates cryptocurrency wallet data and potentially other sensitive information. The malicious activity is triggered only on Linux, allowing it to evade detection on other platforms. The package versions 0.1.1, 0.1.2, 0.2.0, and 0.3.0 are affected.
References
- virustotal.com/gui/file/425f5336182e359211b5d751786d2ce1d31a673ea9c82107358a888803742649/detection (opens in a new tab)
- bad-packages.kam193.eu/pypi/package/fastapii (opens in a new tab)
- tria.ge/260807-fkycrazzg1/behavioral1 (opens in a new tab)
- pypi.org/project/fastapii/0.1.1/ (opens in a new tab)
- pypi.org/project/fastapii/0.2.0/ (opens in a new tab)
- pypi.org/project/fastapii/0.3.0/ (opens in a new tab)
- pypi.org/project/fastapii/0.1.2/ (opens in a new tab)