A malware campaign on the Python Package Index has spent more than two months hiding payloads that decrypt only on machines where a developer is actively working. Four of its eight packages were still downloadable on Dec. 4.
Idan Revivo and Ofek Ronen, researchers at Island, named the operation DevGating. It started Sept. 25, 2026, when the first helper package, pafer 0.9.7, went up, and has since run through four waves.

Eight packages, published in pairs
The packages are webreader, pafer, resion, pafex, colook, basic-crypt, mailreader and confext.
Each wave pairs a “front” package with a “helper,” and the two come from separate PyPI accounts. The fronts pass as plain utilities, such as a web reader, a terminal-color library or a mail parser, and none copies the name of a known project.
Neither half is malicious on its own. In the newest pair, mailreader carries the encrypted payload as a pickle file named default.config, while confext holds the code that unpickles it and runs only on import.
The split also means a takedown of one package leaves the other ready to pair with a new front.
Lures dressed as everyday tools have shown up elsewhere this year, including fake 2FA and AI apps on the Microsoft Store that dropped malware loaders.
The key comes from the victim’s own imports
The malware stores no decryption key. It walks Python’s sys.modules, MD5-hashes each loaded module name joined to itself, and looks for one specific digest.
For mailreader, the match is requests.packages.urllib3.util.connection, which exists in memory only after the requests library loads. That name, with one derived byte added in front, becomes a 42-byte XOR key.
The colook and basic-crypt pair keys on a sibling module, requests.packages.urllib3.util.request.
A sandbox that installs mailreader alone never loads requests, finds no match and sees a working mail parser. A real project that imports requests first triggers decryption. Every malicious branch ends in a bare except: pass, so a failed run produces no errors or logs.
Persistence that outlives uninstall
Once triggered, mailreader’s stage writes py_abi2-log.pth, a one-line file that imports py_log2.
Python executes import lines in .pth path configuration files each time the interpreter starts. No package owns this file, so pip uninstall leaves it behind.
The colook build hides its foothold under setuptools names, writing a fake _distutils_hack package and a distutils-precedence.pth file.
On Linux, the chain uses memfd_create to copy python3 and a 156-byte fetcher into anonymous memory files, then runs them from there. The code also has a hidden python.exe path for Windows and a self-overwriting ~/pip3-update.py for macOS, though the researchers ran only the Linux branch.
Second stage from npoint.io
mailreader fetches its next stage from a public JSON bin at api.npoint[.]io. For now, the bin serves a placeholder that writes “hello” to a file every five seconds.
The operator can change that content at any time, and every infected machine would run the new code at its next Python start. The colook build calls a Supabase edge function instead.
In October, the first wave’s bin served a remote access trojan that reported to a separate Supabase endpoint, last seen Nov. 17. A stub has since replaced it.
Four packages still on PyPI
PyPI has pulled webreader, pafer, resion and pafex. On Dec. 4, mailreader, confext, colook and basic-crypt were still available, and the mailreader listing on PyPI showed version 2.7.2, uploaded Dec. 1, as current.
basic-crypt picked up a 1.5.4 release on Nov. 30. The published indicator list covers 1.5.2 and 1.5.3 but not that build.
Download counts from pypistats are small: 137 for mailreader and 198 for confext as of Nov. 16, with webreader the most-pulled front at 332.
The low numbers match a campaign aimed at developers rather than mass infection, the same target set as the fake Claude Code skills that spread MopsStealer through 487 GitHub repos.
What to look for
Files to hunt for include py_abi2-log.pth, a py_log2 directory, _distutils_hack/__base__.py, ~/pip3-update.py, and a pylog.txt lock file in /tmp or %TEMP%. The MD5 digest 6a3221b95503aa1ac28f3469f9073016 marks the key check.
Deleting the packages does not remove the .pth hook. Any machine that ran the chain needs the persistence files removed by hand.
The researchers advise limiting which packages AI coding agents may install, re-scanning installed dependencies as new intelligence lands, and blocking CI/CD and production hosts from paste sites and hosted data bins with no business use.