DevGating: The PyPI Malware That Only Wakes Up Beside Your Real Code
A malware campaign disclosed today does not bother hiding from your scanner. It waits for your own code to unlock it. Security firm Island detailed the campaign in research published on December 2, 2026, calling the technique “DevGating” — and four of the malicious packages are still live on the Python Package Index, or PyPI, right now.
The packages are small, working Python utilities. One of them is a mail parser. They look harmless on their own, and in a sandbox they are harmless — because the payload only decrypts when the victim’s own project has already loaded the popular requests library. A package that passes every test in isolation can still be a loaded trap in a real project.
What DevGating Is
According to Island’s research, as reported by Infosecurity Magazine, the campaign has been running since September 25, 2026, in four waves covering eight packages, four of them previously unreported. The packages named in the research are mailreader (versions 2.7.1 and 2.7.2), confext (0.7.2), colook (1.1.3), and basic-crypt (1.5.2, 1.5.3 and 1.5.4). Earlier waves — webreader with pafer, and resion with pafex — are no longer listed on PyPI.
Each wave splits the harmful code between two packages published from separate accounts, so neither package shows the full attack chain when checked alone. Each package came from its own account, and each account published only that one project, according to Corgea’s technical write-up of Island’s findings.
Island researcher Ofek Ronen told Infosecurity Magazine on December 2 that the packages were still available on PyPI, and that Island had reported those still listed the day before without hearing back.
How the Trap Works
The payload is encrypted, and the key is not in the package at all. It is the name of a module from the victim’s own running Python process — requests.packages.urllib3.util.connection — found by hashing every entry in the list of loaded modules until one matches. A sandbox that installs the package and imports it by itself never has that module loaded, so it sees nothing. A real project — a notebook, a web service, a test run — usually has requests loaded already, and that is when the payload decrypts.
Island told Infosecurity Magazine that keying malware to its environment is not new, but it had not seen the key drawn from code the victim had already loaded. The firm counted eight evasion layers in the campaign, aimed at controls ranging from code review and functional testing to sandboxing, endpoint scanning and domain reputation.
The split-package design is the other half of the trick. mailreader ships its payload hidden in a file called default.config and depends on confext; confext’s configuration loader unpickles that file at import time. Taken alone, confext looks like a config parser and mailreader looks like a mail library. You only see the attack when you look at both, Corgea notes — and the file’s type check happens only after the code inside it has already run.
Persistence That Survives Uninstall
Once triggered, the chain drops a startup file — py_abi2-log.pth — into the user site-packages directory, along with a small directory called py_log2. Python executes import lines in .pth files at startup, so the loader runs in every later Python process that touches that directory. And because none of those files belongs to an installed distribution, uninstalling the packages with pip uninstall leaves them all in place.
The loader then fetches its next stage from a public JSON bin that the operator can edit at will. The bin currently serves a harmless placeholder — code that writes “hello” to a temporary file every five seconds — but in October the same channel served a remote-access trojan, and the operator can switch every infected machine to new code by editing a single JSON document.
On Linux, the loader runs Python from memory, creating anonymous in-memory files, so nothing new lands on disk and the running executable hashes as a stock python3. On macOS, it writes a file called pip3-update.py, starts it with an –upgrade argument so it looks like a pip upgrade, and overwrites it three seconds later with a real pip-upgrade one-liner.
The operator is still active. mailreader 2.7.2 was published on December 1, adding features while keeping the malicious chain, and a macOS arm64 build of basic-crypt (1.5.4) arrived on November 30.
The Native-Module Variant
The second pair in the campaign, colook and basic-crypt, hides the same chain inside a compiled native module. colook is a terminal color library whose printing function imports basic-crypt; the shipped C source contains only simple XOR and checksum code, but reversing the compiled binary revealed a dropper that runs on import.
It keys on a sibling module, requests.packages.urllib3.util.request, and writes files named _distutils_hack/__init__.py and _distutils_hack/__base__.py — names real setuptools uses, so they blend into almost every Python install — plus a distutils-precedence.pth file. Its loader pulls code from a Supabase edge function run by the operator.
How Widespread Is It?
Download counts are low — in the hundreds per package — according to figures cited by Corgea as of November 16: mailreader 137, confext 198, colook 174 and basic-crypt 406 over 30 days, with the earlier waves in a similar range. Island said it did not know who installed the latest pair, or whether any of those installs ran with the triggering module loaded.
Low volume does not mean low risk. Every machine where the trigger fired can be re-tasked by the operator at any time, simply by editing the file the loader fetches. The current placeholder payload is a reminder of that: the infrastructure is in place, and the operator decides what it does next.
Two More Malware Disclosures This Week
DevGating is not the only new malware family disclosed in the last two days. On December 1, the Citizen Lab, working with Access Now, reported Protopterus, a previously undocumented Windows spyware family used in a multi-year campaign targeting Azerbaijani civil society, including the Khar Center think tank and spouses of political prisoners. The malware steals files and logs keystrokes and clipboard contents; the 2026 build adds recording of application audio. Targets were reached with tailored messages posing as representatives of the Committee to Protect Journalists and the European Endowment for Democracy, with links redirecting through the hacked website of CARE International’s Caucasus branch. The Citizen Lab assessed that the operator was most likely part of, or taking direction from, the Azerbaijani government.
Also on December 1, ESET Research disclosed TZRat, a new financially motivated Android remote access trojan found on devices in Romania and the United Arab Emirates. TZRat abuses Android Debug Bridge to gain shell-level privileges and uses the legitimate scrcpy tool to secretly stream the victim’s screen to its operators, without showing a cast icon. It impersonated the Chrome browser app and was never available on Google Play. ESET attributes the activity with medium confidence to a Chinese-speaking actor.
How to Check and Protect Yourself
Island’s advice, as reported by Infosecurity Magazine: review new packages alongside the dependencies they pull in, treat bundled pickle files and compiled modules in small utilities as code, and watch for unexpected Python startup files and interpreters launched from memory. The firm also warned that a package passing a test in isolation proves less than it seems, and recommended running tests with common libraries already loaded.
Corgea’s write-up adds concrete checks: search lockfiles, container images and developer machines for mailreader, confext, colook and basic-crypt — and remember that removing the package is not enough. Look for py_abi2-log.pth and a py_log2/ directory in user site-packages, and for a _distutils_hack/__base__.py file, which real setuptools never ships. Treat any machine with those files as compromised, and rotate the credentials its Python processes could read.
The Bottom Line
DevGating is a warning shot for how software supply-chain attacks are evolving: the malware no longer needs to beat your scanner — it just needs your own environment to vouch for it. A package that is clean in isolation can still be a loaded trap in a real project, and once it fires, uninstalling it changes nothing. Check your lockfiles for the four named packages, look for the persistence files, and if you find them, treat the machine as compromised. The packages were still live on PyPI when Island’s research was published today — and the operator published a fresh version yesterday.
Sources: Infosecurity Magazine (December 2, 2026); Corgea (December 2, 2026); Island (research, December 2, 2026); ESET Research via GlobeNewswire (December 1, 2026); The Citizen Lab and Access Now (December 1, 2026).
Edited by Muse @QUE.COM
Website: https://QUE.COM Intelligence
Sponsored by: https://MAJ.COM AI Autonomous
Never miss a customer call again — MAJ.COM’s AI receptionist answers every call, texts customers back instantly, and books the appointment for you. See how it works at https://MAJ.COM
Discover more from QUE.com
Subscribe to get the latest posts sent to your email.
