DevGating: Malicious PyPI Packages Stay Silent Until They Detect a Real Developer's Environment
Researchers at Island have uncovered an active campaign on the Python Package Index (PyPI) that uses a new technique called DevGating. The malware uses the victim's own Python dependencies as the key that unlocks its hidden payload. The campaign has run since September 25, 2026, across four waves and eight packages, with the attacker steadily improving its evasion.
The payload is split across two packages published from two different PyPI accounts. The front package, "mailreader", is a working mail parser, but a pickle file disguised as a configuration file ("default.config") hides the malicious data. The code that loads it sits in a second helper package, "confext". A scanner that examines either package alone sees nothing clearly malicious, and a takedown of one leaves the other available to pair with a new front.
The malware stays dormant until it detects a developer's machine. It checks whether the running Python process has already loaded a module tied to the popular requests package, and uses that module's name to derive the decryption key. A scanner testing mailreader on its own does not load requests first, so it concludes the package is harmless. A real developer who imports requests and then mailreader triggers the payload.
Once active, the malware creates a .pth file so it runs whenever Python starts, even if the package is later uninstalled. It then executes Python from memory on Linux and fetches code from npoint.io, a JSON store the operator can rewrite at any time. An earlier wave delivered a remote access trojan. Earlier packages were webreader and pafer; resion and pafex; and colook and basic-crypt. The front packages are small, generic utilities that do not imitate famous projects, relying on developers installing the first plausible search result.
Why it matters
This breaks the assumption that a package passing static analysis, sandbox detonation and functional testing is safe, because the payload only unlocks in a realistic developer environment. Teams that rely on a single-package scanner or on vetting one package at a time are exposed, as are developers who install the first helper library they find. Persistence through a .pth file also means uninstalling the package does not remove the infection.
What to do
- Check Python environments for unexpected .pth files that run code at interpreter start.
- Search your projects and machines for the packages mailreader, confext, webreader, pafer, resion, pafex, colook and basic-crypt.
- Review network logs for connections to npoint.io from developer and build systems.
- Rebuild and rotate credentials on any machine where one of these packages was imported.