Armando identified confext v0.7.2, published to PyPI on October 27, 2026, as the loader half of a two-package malware delivery chain. On its own the package looks like a small HTML parsing library and carries no payload. Its configuration loader, however, is designed to find the calling package's bundled default.config file and unpickle it before validating it -- which is exactly how the companion package mailreader gets its hidden backdoor to run. confext was published two weeks before mailreader, from a separate single-package account, and is mailreader's only declared dependency. It has recorded 711 downloads.
Key Findings
- Malicious version: v0.7.2, published 2026-10-27 04:35 UTC; confext has no other release
- Entry point:
confext.config.load_config(), called at import time by mailreader's engine.py
- Targets: any platform running Python; executes the code embedded in the caller's config pickle
- Evasion: the dangerous deserialization is presented as a checksummed, compressed configuration format; the type check runs only after
pickle.loads has already executed the payload; the loader is split into its own package so neither half looks complete on its own
- Detection: Script-Python.Trojan.SupplyChain, Text.Trojan.SupplyChain, Archive-ZIP.Trojan.SupplyChain, Archive-GZIP.Trojan.SupplyChain, Archive-TAR.Trojan.SupplyChain
Package Background
confext describes itself as "stdlib HTML parsing into a tree model." It was published on October 27, 2026 by the PyPI account kinishuki, which owns no other packages, and it declares no source code repository. It has 711 recorded downloads. Most of its modules -- a tree model, a reader and an engine -- are ordinary HTML-handling code.
The package's role becomes clear from its consumer. mailreader, published on November 10, 2026 by another single-package account, declares confext as its sole dependency and calls its configuration loader at import time. confext ships no config file of its own; the file it ends up loading is the one mailreader brings.
Attack Analysis
A loader that executes the caller's file. confext/config.py exposes load_config(). When called without a path, it inspects the caller's stack frame (sys._getframe(1)), takes the caller module's file location, and looks for a default.config next to it, falling back to the caller's package directory. In other words, it is built to load a file that belongs to whichever package calls it, not to confext.
Deserialize first, validate later. The file format is an 8-byte truncated SHA-256 checksum, a 4-byte length and a payload that may be xz- or zlib-compressed. _read_config() verifies the length and checksum, decompresses, and then calls pickle.loads on the result. Only after unpickling does it check that the result is a dictionary and sanitise its values to plain data types. Those checks give the format the appearance of safety, but they come too late: unpickling is code execution, so any instructions embedded in the pickle have already run by the time the type check rejects or accepts the result.
How the chain fires. mailreader's engine.py calls load_config() at module level, so simply importing mailreader causes confext to unpickle mailreader's default.config. That pickle calls builtins.eval, which decrypts a further stage only when a requests sub-module is loaded, and then installs a .pth startup hook that downloads and runs code from an attacker-controlled JSON bin on every Python start. confext supplies the one step mailreader cannot perform with an innocent-looking call of its own: turning a data file into running code.
Why a separate package. Splitting the chain across two packages and two accounts means neither package contains a complete attack. confext has no payload and no network code; mailreader has no pickle.loads call and no eval in its Python source. Reviewing either package in isolation, or scanning only for suspicious Python source, misses the chain.
Malicious Files
config.py (Script-Python.Trojan.SupplyChain) is the campaign loader component. Its load_config() inspects the caller's stack frame to find the caller package's default.config and passes it to pickle.loads before any type check -- the execution vehicle for mailreader's malicious pickle.
METADATA (Text.Trojan.SupplyChain) and pyproject.toml (Text.Trojan.SupplyChain) are the manifests that ship the loader.
Recommendations
Developers and security teams should take the following steps:
- Identify exposure: Check whether confext v0.7.2 appears in your dependency tree, most likely as a dependency of mailreader. Any environment that imported mailreader should be considered compromised.
- Remove the packages: Uninstall confext and any package that depends on it. confext has no clean release.
- Inspect affected systems: Where mailreader was imported, look for the persistence its payload installs --
py_abi2-log.pth and a py_log2/ directory in the user site-packages directory -- and for the outbound requests listed in the mailreader indicators. Removing the packages does not remove that persistence.
- Treat pickle-based config loaders as code: Do not load pickled configuration from third-party packages; a checksum or post-load type check does not make unpickling safe.
- Scan your software supply chain: Use Spectra Assure Community to check whether packages in your environment have been flagged.
Indicators of Compromise
Malicious Files
| Filename | SHA256 | Detection |
|---|
| config.py | a315c2da15401a428824d00dc7a49152c08921a30ecefa40650b7af1fd265ec9 | Script-Python.Trojan.SupplyChain |
| METADATA | 66fff6ab41bf64684a5cfec57161a5bed30c89d590a41e049c8e7767f89b4eaa | Text.Trojan.SupplyChain |
| pyproject.toml | 366048d7aadeff1c841d17de3ca3bc8598801767bf750b58e56931b4caf9cebf | Text.Trojan.SupplyChain |
Network IOCs
| URL / IP | Purpose |
|---|
| None | This release ships only the unpickling loader; the payload and its network endpoints are carried by the package that calls it |
Archive Hashes
| File | SHA256 |
|---|
| confext-0.7.2-py3-none-any.whl | 8b39970f7fc5c58646980092f0114753280ca5ed7df00f3e8d0774f430281631 |
| confext-0.7.2.tar.gz | 8d6356f24ecb66b1ee166fec2351f1787e13d10aab90456d52a7010b17406159 |
| confext-0.7.2.tar | 919fa397bedf53ec0830fe40f3b6929afc8d3db77e21a1399df0a82325a9a3e2 |