An "active and evolving" campaign targeting the Python Package Index (PyPI) repository has been found to employ a novel technique dubbed DevGating that uses the victim's Python dependencies as a key to unlock the payload.
The campaign, according to Island, has been active since September 25, 2026, and spans four waves and eight packages, with the attacker progressively iterating its evasion techniques. One such version, released earlier this month, adds legitimate functionality while keeping the malicious functionality intact.
"Keying a payload to the victim's environment is not new," Island researchers Idan Revivo and Ofek Ronen said. "What we have not seen documented before is the source of the decryption key: the victim's own loaded Python dependencies. The malware uses the name of a module loaded alongside 'requests' to decrypt its payload."
The final payload comes with several layers to help it sidestep detection. Once activated, it establishes persistence by means of a .pth file that ensures it runs automatically when the interpreter starts, irrespective of whether the package exists or has been uninstalled.
The end goal of the attack is to execute Python directly from memory on Linux and retrieve code from npoint.io, a one-way JSON store, the operator can rewrite at any time. An earlier wave is said to have delivered a remote access trojan (RAT).
Central to DevGating is the fact that the main payload is split across two packages from two different PyPI accounts so that a scanner that analyzes any one of them in isolation fails to detect the malicious behavior.
Case in point, the front package "mailreader" ships a working mail parser library that bypasses code review and typosquat checks. The malicious code, however, resides in a pickle file disguised as a configuration ("default.config") within the package and is only loaded when a second helper package, named "confext," is imported.
"The malicious data ships in mailreader's own default.config, and the code that unpickles it ships in confext, published from a different account," Island researchers said.
Journalistic Attribution: Reported via The Hacker News for public informational purposes under Fair Use. Read the original primary report →
Copyright of original reporting belongs to The Hacker News. Contact support@cubiqinfotech.com for DMCA inquiries.