top of page

DevGating: 8 Malicious PyPI Packages Stay Silent Until Your Code Imports requests. pip uninstall Won't Remove Them

Writer: Patrick Duggan
Patrick Duggan
2 hours ago
6 min read

If any Python environment you own has ever installed mailreader, confext, colook, basic-crypt, webreader, pafer, resion or pafex, do this today: uninstall the package, then go hunting in site-packages for the files it leaves behind, because uninstalling does not remove them. The persistence lives in a .pth file named py_abi2-log.pth (mailreader chain) or a fake _distutils_hack folder with a distutils-precedence.pth (colook chain). Delete those, rebuild the environment from a clean lockfile if you can, and rotate any secrets that environment could read.


Island's researchers Idan Revivo and Ofek Ronen published the research on Wednesday, December 2, 2026. They call the technique DevGating, and the new part is where the decryption key comes from. In their words: "What we have not seen documented before is the source of the decryption key: the victim's own loaded Python dependencies." The payload only unlocks inside a process that has already imported the popular requests library. As Island puts it, "The key is never in the package."



What to do, in order


  1. Check for the eight names. Run pip list (or pip freeze) in every virtualenv, container image and CI runner you have, and search your lockfiles and requirements files for mailreader, confext, colook, basic-crypt, webreader, pafer, resion and pafex. Island's table lists mailreader 2.7.1 and 2.7.2, confext 0.7.2, colook 1.1.3, basic-crypt 1.5.2 and 1.5.3, webreader 2.3.8, pafer 0.9.7 and 0.9.8, resion 22.0.1 and pafex 2.3.

  2. Uninstall, then clean up what pip leaves. Island is blunt about why step 2 has two halves: "pip uninstall mailreader removes the library and leaves the attacker's code running in every later Python process." Look in every site-packages and dist-packages directory for: py_abi2-log.pth, a py_log2 folder (with __init__.py and __cached__.py), a _distutils_hack/__base__.py file (real setuptools does not ship one, and Island says the folder's __init__.py also gains a launcher at the end), distutils-precedence.pth if you did not get it from setuptools, and basic_crypt/_native.so. Also check for the lock file /tmp/pylog.txt (or %TEMP%\pylog.txt on Windows) and, on macOS, ~/pip3-update.py.

  3. Treat the environment as exposed. Island documented the October first wave as a remote-access trojan. Rotate any API keys, cloud credentials and tokens the affected environment or CI runner could read. Rebuilding from a known-clean image beats trying to scrub one.

  4. Block the published C2. Pull these indicators into your blocklist (the list is at the bottom). Island's own advice for the bigger class: "Use network security policies to restrict access from CI/CD and production environments to public paste sites, anonymous file-sharing services and hosted data bins where there is no legitimate business need."

  5. Stop trusting install-time scans alone. Island again: "Do not rely on security assessments performed only at installation." Re-check what is already installed, not just what is being added.


How the lock works


Island lays out a two-package chain. mailreader ships a working mail parser plus a default.config file. That file is a Python pickle. A second package, confext, published from a different PyPI account, is the code that unpickles it. Island: "The malicious data ships in mailreader's own default.config, and the code that unpickles it ships in confext."


The decrypted stage is XOR-encrypted with no key in sight. The code walks sys.modules, the list of modules the running Python process has already loaded, and takes the MD5 of each module name written twice until one matches a stored hash. The match is requests.packages.urllib3.util.connection, a module that only appears if requests was imported first. That name becomes the key. A real developer process imports requests all the time. A malware sandbox that installs mailreader by itself does not. Island: "A sandbox that installs and imports mailreader on its own sees a configuration file load and nothing else."


Once open, the stage writes the py_log2 package and the .pth file, which runs on every Python start. On Linux, Island says the launcher runs Python from memory. The colook and basic-crypt pair does the same job with a compiled native module, keyed to a loaded requests module as well, and hides its persistence as copies of setuptools' own _distutils_hack files. Island analyzed that pair statically.


Two more things make this hard to catch. "Nothing happens at install time, so there is no setup.py hook or post-install script to flag." And the command-and-control is on clean-reputation developer services: a public npoint.io JSON bin for mailreader and Supabase edge functions for the other waves.



What is confirmed and what is not


  • Confirmed by Island: eight packages across four waves, each PyPI account publishing exactly one project. The earliest, pafer, was created Friday, September 25, 2026. The newest upload, mailreader 2.7.2, was created December 1, 2026, the day before the research. Island's table marks mailreader, confext, colook and basic-crypt "Live, reported" and the other four removed. Download counts as of November 16, per Island: mailreader 137, confext 198, colook 174, basic-crypt 406 (last 30 days), webreader 332, pafer 386, resion 106, pafex 117. That is downloads, not victims: mirrors and scanners download too.

  • Confirmed by Island's detonation: on November 16, Island ran mailreader 2.7.1 on Linux with requests imported first and watched each layer open.

  • Not known: what the current payload steals. Island says the bin today "returns a placeholder loop that writes hello to a file every five seconds," and reads that as an operator who may be waiting for installs to grow before arming the chain. The bin can be rewritten at any time, so "harmless today" says nothing about tomorrow, and nothing about what the September and October waves ran.

  • Not known: who is behind it. Island does not attribute it. Neither do we.


Did our deny-list already flag these?


We ran each name through our free check-package tool (the Jeevesus MCP server) before writing this. Honest result, before our ingest:


  • Blocked (4): webreader, pafer, resion and pafex returned verdict "block". Those blocks come from OSV's malicious-package records (MAL-2026-17757, MAL-2026-17756, MAL-2026-18095 and MAL-2026-18094). Our deny-list carries OSV's records; OSV and its reporters found them, not us.

  • Not on the list (4): mailreader, confext, colook and basic-crypt were not on the deny-list. Our reputation heuristic did return "review" for all four (packages under 90 days old with low downloads), which tells an agent to stop and have a person look. Review is not block, and that gap is ours.

We have now added all four to our feed as curated records citing Island, along with the 12 file hashes and the C2 below, and read each record back after the write. A check-package call for those four now returns "block".



Am I affected?


You are affected if any of the eight names appears in pip list, a lockfile or a container image you built since late September, or if py_abi2-log.pth, a py_log2 folder or _distutils_hack/__base__.py exists in any site-packages. Search your egress or proxy logs for api.npoint.io/df37d3253fff53e2034f and the two supabase.co hosts below. A hit on any of these means the environment ran the chain. No hit on the network side does not clear you: the operator can move the C2.



How we know


  • We read Island's research directly and quote it above. The package table, dates, accounts and indicators are Island's. We extracted the hashes from the page itself.

  • The Hacker News report (Ravie Lakshmanan, December 3) was our lead to the story, not our source of fact. Every claim here traces to one source, Island.

  • Deny-list results come from our own check-package calls on December 3, 2026, before and after the ingest.

  • Edge check: not applicable. This is a malicious-package install and outbound C2, not something that probes websites, so our edge sensors would not see it.

Confidence capped at 95%. Island says the bin content can change; what it serves today may not be what it serves next week.



Indicators


Block these: get the free feed key. Setup docs at docs.dugganusa.com. All indicators are Island's, cited not claimed. Defanged here.


Malicious PyPI packages: mailreader, confext, colook, basic-crypt (added to our feed today), webreader, pafer, resion, pafex (already blocked via OSV).


  • hxxps://api.npoint[.]io/df37d3253fff53e2034f/login (mailreader C2 bin; npoint.io itself is a shared service, so we list only this URL)

  • hxxps://frjmzbjbhwvtdnsuodmu[.]supabase[.]co/functions/v1/save (wave 1)

  • hxxps://tzqrmubxuluyccmiialf[.]supabase[.]co/functions/v1/register (colook and basic-crypt)

Files: py_abi2-log.pth, py_log2/__init__.py, py_log2/__cached__.py, _distutils_hack/__base__.py, distutils-precedence.pth (colook variant), /tmp/pylog.txt, %TEMP%\pylog.txt, ~/pip3-update.py.




Sources


Read next: We Shipped a Free MCP Tool That Makes Your AI Agent Refuse Malicious Packages. Island's first defender action is to put a package policy in front of your coding agents. That is one call.




Every indicator in this post is in the feed. Free.

1.58M+ IOCs, STIX 2.1 / TAXII, 88% novel vs ThreatFox, exploited-CVE leads ahead of CISA. No credit card — a free API key in 30 seconds, and you can audit every claim above against the live endpoints.


Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating
bottom of page