pylever (PyPI) · Malicious Code
Affects pyleverSource GCVE Database
Malicious package : remove pylever and rotate any secrets on hosts that installed it.
Data as of 23 Sep 2026, 06:23 UTC
Malicious package
Published to PyPI · OSV MAL-2026-16122
What to do
Remove pylever 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 |
|---|---|---|
| PyPIpylever | 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 pylever package on PyPI contains malicious code that harvests Discord authentication tokens from local browser and Discord app storage. It scans LevelDB and cache directories of Chrome, Edge, Brave browsers, and Discord's local storage for token patterns, decrypts protected tokens using DPAPI via PowerShell, validates them against the Discord API, and exfiltrates valid tokens and associated user information to a hardcoded Discord webhook URL. The package metadata and README mislead users by suggesting it restores accidentally removed tokens, while it actually performs bulk token harvesting and exfiltration.
References
- bad-packages.kam193.eu/pypi/package/pylever (opens in a new tab)
- pypi.org/project/pylever/1.0.11/ (opens in a new tab)
- pypi.org/project/pylever/1.0.10/ (opens in a new tab)
- pypi.org/project/pylever/1.0.12/ (opens in a new tab)
- pypi.org/project/pylever/1.0.1/ (opens in a new tab)
- pypi.org/project/pylever/1.0.2/ (opens in a new tab)
- pypi.org/project/pylever/1.0.9/ (opens in a new tab)
- pypi.org/project/pylever/1.0.5/ (opens in a new tab)
- pypi.org/project/pylever/1.0.4/ (opens in a new tab)
- pypi.org/project/pylever/1.0.7/ (opens in a new tab)
- pypi.org/project/pylever/1.0.6/ (opens in a new tab)
- pypi.org/project/pylever/1.0.3/ (opens in a new tab)
- pypi.org/project/pylever/1.0.0/ (opens in a new tab)