DevGating Malware on PyPI Hides From Sandboxes

· CyberSecurity

TLDR

  • Island says a PyPI campaign active since 25 September used eight packages in four waves to hide its payload.12
  • The payload decrypts only when a module from a victim's loaded dependencies matches, so sandboxes see nothing.1
  • Island says the latest mailreader release came on 1 December, and packages remained on PyPI after it reported them.12

Security firm Island published research on 2 December 2026 describing a software supply chain campaign on the Python Package Index (PyPI) that it calls DevGating.12 Island says the activity has run since 25 September 2026 in four waves, with eight packages in total, four of them previously undisclosed.12 Each wave pairs a working Python utility with a helper published from a separate account, so neither package shows the full chain when scanned alone.12 The newest pair is mailreader, a mail parser, and its helper confext.1

The technique keys the encrypted payload to the victim's running Python process.1 In mailreader, Island says the decryption key is derived from the name of a module loaded alongside requests, so a sandbox that installs and imports the package on its own never loads that module and sees only a configuration file load.1 Island says keying malware to its environment is not new, but it has not seen the key drawn from the victim's own loaded dependencies documented before.12 It counts eight evasion layers, each aimed at a different control: code review, per-package scanning, source-code analysis, functional testing, sandbox detonation, uninstall-based remediation, file-based endpoint scanning and network reputation.1

Once decrypted, Island says the chain plants a .pth file that runs on every Python start and survives uninstalling the package, runs Python from memory on Linux and fetches later code from a free JSON bin the operator can rewrite at any time.1 Island says an earlier wave delivered a remote access trojan, based on a copy of the bin captured by a public URL scanner in October, while the current payload is a placeholder.12 Island warns that the .pth hook runs in every later process on the same Python interpreter, including continuous integration jobs and services holding source code and cloud secrets.12

Island says mailreader 2.7.1 appeared on 10 November and that the operator published 2.7.2 on 1 December, adding attachment-saving features while keeping the malicious chain.1 Island's download counts, taken from pypistats with mirrors excluded as of 16 November, put each package between 106 and 406 downloads, including 137 for mailreader and 198 for confext.1 Island says it does not know who installed the latest pair or whether any of those installs ran with the triggering module loaded.12 Island researcher Ofek Ronen told Infosecurity Magazine on 2 December that the packages were still on PyPI and that Island had reported all those still listed the day before without hearing back.2 Infosecurity Magazine reports Island's advice to review new packages alongside the dependencies they pull in, treat bundled pickle files and compiled modules in small utilities as code, run tests with common libraries already loaded, and watch for unexpected Python startup files and interpreters launched from memory.2 Island's own post stresses installation policies for AI coding agents, continuous reassessment of installed packages and restricting CI and production access to public paste sites and hosted data bins.1

Single-source note: the findings come from Island, which is both the researcher and the primary source, and its post also promotes its own agentic endpoint product.1 Infosecurity Magazine reports Island's account and quotes an Island researcher, and the cited sources contain no independent corroboration.12

Why it matters: a package that passes sandbox and functional checks can still run malicious code once imported into a real project, so Island's advice to test with common libraries already loaded and to watch for unexpected Python startup files applies to developer machines and CI jobs.2

Sources

  1. DevGating: The PyPI Malware That Stays Silent Until It Finds a Developer (Island)
  2. DevGating PyPI Malware Hides Until it Reaches Developers (Infosecurity Magazine)