Short answer: A malware campaign on PyPI hides until it reaches a developer's environment, where it can run. Developers should review packages and dependencies carefully, especially Python startup files.

TL;DR

  • Malware hides in PyPI packages until they reach a developer’s environment.
  • Packages split malicious code between two accounts to avoid detection.
  • Malware triggers only when specific modules are loaded in the developer’s code.
  • Operators can update packages with new features, even after detection.

What happened?

DevGating is a malware campaign that hides in Python packages on PyPI. It remains inactive until it reaches a developer's environment, where it can run. Each wave of packages divides the malicious code between two accounts, making detection difficult. Malware triggers only when specific modules are loaded in the developer’s code. Operators can update packages with new features, even after detection.

Malware
Harmful software made to spy, steal or damage.

Key facts

Reported byInfosecurity Magazine
Date reported02 Dec 2026

How it works

Attack flow: Packages contain harmful code. then Code remains inactive until real environment. then Key unlocks payload from victim’s code. then Survives package removal with startup hooks. then Fetches later code from web service.
Built from the checked story facts

A malware hides in Python packages and only activates when run in a developer's environment. It uses encryption and environment-specific keys to avoid detection by scanners and sandboxes.

  1. Packages contain harmful code.
  2. Code remains inactive until real environment.
  3. Key unlocks payload from victim’s code.
  4. Survives package removal with startup hooks.
  5. Fetches later code from web service.

Timeline

DateEventSource
2026-12-02Reported by Infosecurity MagazineInfosecurity Magazine
2026-12-03This Skillmate explainer publishedSkillmate

How to fix it

  1. Keep the operating system, browser and security software updated.
  2. Do not open unexpected attachments or install software from unofficial sources.
  3. Report suspicious files or pop-ups to your IT or security team.

How to detect it

Look for packages with unusual imports or startup files.

Signs to watch for:

  • Unknown programs starting at boot, or new scheduled tasks.
  • Security software that was turned off without a reason.
  • Unusual outbound connections from a workstation.

What is confirmed

  • Reported by Infosecurity Magazine

Why it matters

This matters because developers may unknowingly install malware, risking company and user data. It highlights the need for thorough testing and security awareness.

Learn the skills behind this story

Want to understand attacks like this and defend against them? Join Skillmate cybersecurity training or practise hands-on in Skillmate Labs.

FAQ

What is DevGating?

DevGating is a technique where malware hides in Python packages and only activates when it reaches a developer's environment.

How does DevGating evade detection?

It encrypts the payload and uses a key from the victim's running Python process, making it appear harmless in isolation.

Can developers install these packages without risk?

The risk is low if developers run tests with common libraries loaded, not just isolated package checks.

What should developers do to prevent DevGating?

Review new packages and their dependencies, and treat bundled files and modules as code.

Sources

How we wrote this: facts come from the sources above. An on-prem AI model drafted the plain-English parts and every sentence was checked against the sources; unsupported sentences were removed. MITRE mapping is our own judgement.

Watch today's video brief: https://youtu.be/iatXvZ_3AaY