Your Own Dependencies Unlocked the Malware. Eight PyPI Packages Hid It.
Eight small Python packages walk into a developer’s project — and the key that unlocks the malware inside them is already sitting on the victim’s own machine. That is the trick behind DevGating, a campaign researchers at Island disclosed on December 2 — and it turns a basic assumption of software security on its head.
The campaign has been active since September 25, 2026, moving in four waves of paired packages. The first three — webreader with pafer, resion with pafex, and colook with basic-crypt — refined the technique. The fourth and latest, mailreader with confext, first appeared in November, and its newest version arrived on December 1, adding genuine, working functionality while keeping the malicious chain intact. Eight packages in total, four of them still listed on PyPI when Island disclosed the campaign.
Each front package is a small, generic developer utility: a web reader, a mail parser, a terminal-color library. None imitates a famous project. The lure is a developer searching PyPI for a quick helper and installing the first plausible result.
The split: two packages, neither one guilty alone
The payload is divided across two packages published from two different PyPI accounts, so no scanner that examines one package alone ever sees the whole attack. mailreader ships a working mail parser that passes code review and typosquat checks. The malicious data hides inside it, in a pickle file disguised as a configuration file called default.config. The code that unpickles that file lives in the second package, confext, and it only runs when confext is imported. As researchers at Island put it, the malicious data ships in mailreader’s own default.config, and the code that unpickles it ships in confext. A scanner looking at mailreader alone finds a config call; one looking at confext alone finds a config parser. Neither package holds the whole story — and taking down one leaves the other live, ready to pair with a new front.

The key: your own dependencies
Even with both packages installed, the payload stays encrypted until the victim’s Python process has already loaded a specific module from the popular requests library — requests.packages.urllib3.util.connection for the mailreader chain, requests.packages.urllib3.util.request for the colook chain. The name of that loaded module becomes the decryption key. A sandbox that imports the package on its own never loads requests, so the scanner sees a harmless utility. A real developer imports requests first and the malicious package second — and the payload decrypts and runs.
Once it runs, the malware sets up persistence with a .pth file that executes every time Python starts — and survives uninstalling the package. The goal is to run Python directly from memory on Linux and fetch operator-controlled code from npoint.io, a JSON store the operator can rewrite at any time. An earlier wave delivered a remote access trojan instead. Island counts eight evasion layers, each aimed at a different control: code review, per-package scanning, source-code analysis, functional testing, sandbox detonation, uninstall-based remediation, file-based endpoint scanning, and network reputation.
Why it matters
“DevGating exposes a gap between how security tools analyze packages and how developers actually use them,” Island said. “A package can pass static analysis, sandbox detonation and functional testing, yet execute malicious code when imported into a real project.” The tools test a package alone in a clean room; developers never use one alone. A dependency is only ever loaded next to dozens of others, and DevGating is the first campaign documented to turn that ordinary fact into the decryption key.
PyPI has been abused before — but that attack compromised packages people already trusted. DevGating needs no trust at all. And once code runs on a developer machine, the blast radius is everything that machine can reach — CI secrets, cloud credentials, and signing keys.

Four checks for your own projects
- Check your lockfiles for the eight names. Search every
requirements.txt,pyproject.toml, and lockfile for mailreader (2.7.1, 2.7.2), confext (0.7.2), webreader, pafer, resion, pafex, colook (1.1.3), and basic-crypt (1.5.2, 1.5.3). Any hit is a find, even if the package looks unused — the pair only needs to be installed to matter. - Hunt the
.pthfiles. Look inside everysite-packagesdirectory for.pthfiles you did not expect, and read what they point to. Uninstalling the package does not remove the persistence, so a cleanpip listis not proof the machine is clean. - Test new packages the way your project actually uses them. A package that behaves in a sandbox proves nothing if your developers load it next to
requestsand twenty other libraries. Vet unfamiliar helpers with your real dependencies loaded — and treat a package that only misbehaves in a real project as compromised, not buggy. - Slow down on small, generic helpers. Check who published the package, when the account was created, and whether the project has a real homepage and history before installing it. A tiny utility from an unknown publisher deserves more suspicion, not less.
DevGating’s lesson is simple and uncomfortable: a package that looks clean in a sandbox has only proven that it is clean in a sandbox. The test that matters runs the way your developers actually work — with their real dependencies loaded. Until scanners test packages that way, the key to the next attack will keep sitting on the victim’s own machine, waiting to be used.



















