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).

The list of identified packages is below -

  • mailreader (versions 2.7.1, 2.7.2)
  • confext (version 0.7.2)
  • webreader
  • pafer
  • resion
  • pafex
  • colook (version 1.1.3)
  • basic-crypt (versions 1.5.2, 1.5.3)

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.

"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."

But the malware's bag of tricks doesn't end there. The central idea behind DevGating is that the payload remains dormant and deliberately avoids behaving like malware until it detects it is running on a developer's machine.

To do so, the malware checks whether the running Python process has already loaded a specific dependency associated with the popular requests package ("requests.packages.urllib3.util.connection"), and, if present, uses it as a fingerprint to derive the decryption key necessary to unlock and launch the malicious code.

A scanner that tests "mailreader" on its own doesn't load the "requests" module first, and hence concludes the package is harmless. However, a real developer working on a backend application may import the two packages, first requests followed by mailreader, causing the malware to decrypt and run the concealed payload within the configuration.

The malware then sets up a .pth file that runs on every Python start and then fetches code staged in point.io for subsequent execution.

While mailreader and confext represent the latest wave, they were preceded by three earlier waves: webreader and pafer; resion and pafex; and colook and basic-crypt. The "colook" package, unlike "mailreader," implements DevGating by searching for a different module ("requests.packages.urllib3.util.request").

"DevGating exposes a gap between how security tools analyze packages and how developers actually use them," Island said. "A package can pass static analysis, sandbox detonation and functional testing, yet execute malicious code when imported into a real project." 

"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 disclosure comes as Aqua detailed a Linux eBPF rootkit called GhostMap that has been found to be distributed via an evolved variant of the Shai-Hulud worm called IronWorm.

GhostMap also shares some level of implementation overlap with another rootkit put to use in a June 2026 campaign, codenamed Atomic Arch, that compromised hundreds of orphaned packages in the Arch User Repository (AUR) to also push a stealer and wallet drainer.

"It blinds user-space applications by manipulating kernel data on the fly to hide malicious processes, files, and network sockets," Aqua security researchers Dolev Mizrahi and Ivan Kosarev said.

In recent weeks, unknown threat actors have also been observed using stolen GitHub tokens to push a credential stealer into tens of thousands of repositories since November 10, 2026, with an aim to siphon GitHub Actions secrets and cloud credentials.

The activity has proliferated into at least one Packagist and one Golang package through automated publishing triggers. No less than 1,806 repositories are assessed to be impacted, with over 8,000 repositories receiving malicious commits between November 10 at 12:46 p.m. and November 12 at 4:35 a.m. UTC.

The stealer is designed to run once, either via GitHub Actions or during npm install using a postinstall hook, and is capable of stealing a repository's secrets and cloud credentials for the attacker.

Threat actor uses compromised accounts to open a pull request titled "docs: dependency audit notes" from a branch called "wfx-docs." According to Aikido, 4,837 compromised accounts have opened probe pull requests in 61,764 repositories.

The pull request tests whether the token can write to the repository and then drop the stealer in one of three ways -

  • A new workflow file ("github/workflows/build-audit-<xxxxxx>.yml") that runs on every code push.
  • Modifying an existing workflow.
  • Create an npm postinstall hook in package.json that runs it on npm install.

"In almost all repositories the attacker then reverts the commit, so the branch looks clean," SafeDep researcher Kunal Singh said.

The stolen data is then exfiltrated to 194.150.166[.]244 or 18.143.168[.]96 using an HTTP POST request. The malware also attempts to abuse the collected credentials to obtain deeper access to AWS, Google Cloud, and Microsoft Azure by minting new access keys and federated credentials that can outlast the run.

It's unclear who is behind the attack, but Aikido said the modus operandi shares some level of overlap with another campaign dubbed GhostAction that's known to inject rogue secret-scanning workflows disguised as security audits and deploy a stealer.

Found this article interesting? Follow us on Google News, Twitter and LinkedIn to read more exclusive content we post.