VMTech
Discuss a project →

DevGating campaign conceals malware across eight PyPI packages

DevGating campaign conceals malware across eight PyPI packages

Island has identified an active PyPI supply-chain campaign that has used eight malicious packages across four waves since September 25, 2026. The latest wave pairs mailreader, released in versions 2.7.1 and 2.7.2, with confext version 0.7.2 to conceal a payload that activates only when a particular Python dependency is already present.

Island calls the technique DevGating. Rather than embedding an immediately observable decryption key, the malware uses the name of a module loaded alongside the popular requests library as environmental input. This makes a developer's running Python environment part of the condition for unlocking the malicious code.

Two packages divide the malicious chain

The mailreader package includes a functioning mail-parser library, giving it legitimate behaviour that can help it pass routine code review and checks for typosquatting. Its malicious data is stored in a pickle file named default.config, presented as configuration content.

The companion package, confext, supplies code that unpickles the file provided by its caller. It was published from a separate PyPI account. Looking at either component alone can therefore obscure the full chain: mailreader appears to load configuration, while confext appears to parse a supplied configuration file.

Island said this division also complicates remediation. Removing one package does not necessarily remove the other, which can remain available to be paired with a new front package. The campaign's earlier waves used the pairs webreader and pafer, resion and pafex, and colook and basic-crypt. Colook version 1.1.3 looked for a different requests-related module, while basic-crypt appeared in versions 1.5.2 and 1.5.3.

Execution depends on a real developer environment

For the mailreader chain, the malware checks whether requests.packages.urllib3.util.connection has already been loaded. If it has, that module name is used to derive the key that decrypts and launches the concealed payload. A scanner that exercises mailreader without first loading requests will not meet that condition.

In a backend application, however, a developer might import requests and then import mailreader together with confext. Under those conditions, the payload can decrypt and execute. Island said the design exposes a gap between package analysis in isolation and the dependency combinations used in live projects.

Persistence and code retrieval follow activation

After activation, the malware creates a .pth file intended to run when the Python interpreter starts, including after the original package has been removed. The campaign then retrieves code from npoint.io, a one-way JSON store whose content an operator can change, for subsequent in-memory Python execution on Linux. An earlier wave delivered a remote access trojan.

The packages are small, generic utilities such as web readers, mail parsers and terminal-colour libraries rather than imitations of well-known projects. For businesses, the practical implication is to assess new PyPI dependencies together with their runtime imports and package relationships, while investigating unexpected .pth files and outbound retrieval of executable code.

#pypi#pythonsecurity#supplychain#malware
Open analytics
On the site 9 views
min read 4 03.12.2026
Instagram

DevGating campaign conceals malware across eight PyPI packages

Open the post on Instagram ↗