TL;DR: 97 malicious packages were confirmed across public registries in one week and more than 250 in April 2026, with repeated publishing, version inflation, and credential-exfiltration patterns aimed at npm, PyPI, and related developer workflows, according to Xygeni’s Malicious Code Digest. The real control gap is not detection alone but whether build pipelines expose secrets, trust package metadata, and allow malicious code to reach runtime before enforcement catches it.
NHIMG editorial — based on content published by Xygeni: The Malicious Code Digest and weekly npm malware summary
By the numbers:
- Researchers confirmed 97 malicious packages across public registries during this period.
- In April 2026, the team confirmed more than 250 malicious packages, primarily across npm.
- Malicious open-source packages surged 156% in one year.
Questions worth separating out
Q: What should teams do after a malicious npm package has run in CI/CD?
A: Contain the build environment, assume secrets on that system are exposed, and rebuild from a known-good baseline before restoring access.
Q: Why do malicious packages so often lead to secret theft?
A: Because install and test workflows frequently expose credentials that developers and CI systems rely on every day.
Q: What do security teams get wrong about package ecosystem trust?
A: They often assume trusted registries and familiar maintainers are enough to validate safety.
Practitioner guidance
- Scope registry and publish tokens tightly Issue separate, least-privileged tokens for package publishing, registry read access, and CI automation.
- Remove high-value secrets from build environments Keep cloud credentials, registry credentials, and deployment keys out of general CI variables where possible.
- Block risky install-time behaviors by policy Fail builds when packages use unexpected install hooks, obfuscated loaders, or network callbacks during dependency installation.
What's in the full report
Xygeni's full Malicious Code Digest covers the operational detail this post intentionally leaves for the source:
- Per-package malware samples and indicators of compromise for confirmed npm, PyPI, OpenVSX, and Composer cases
- Behavioural analysis of install hooks, persistence tricks, and credential-exfiltration payloads
- Weekly and monthly malware report views that show how campaigns evolve across registries
- Detection logic and alerting examples for CI/CD pipelines that need enforcement rather than summary insight
👉 Read Xygeni's Malicious Code Digest on confirmed npm and PyPI malware →
Npm malware in CI/CD pipelines: what security teams should change?
Explore further
Supply chain malware is now an NHI governance problem, not only an AppSec problem. The article shows attackers targeting registry tokens, build credentials, and environment secrets, which means the real asset at risk is machine identity rather than code alone. When secrets are embedded in pipelines, malware can authenticate as trusted automation and move laterally through publishing and deployment paths. The practitioner conclusion is clear: identity controls must extend into software delivery.
A question worth separating out:
Q: How should organisations respond when a build token may have been exposed?
A: They should revoke the token immediately, review publishing and access logs, and assume the token may have been reused across dependent workflows. Containment should include secret rotation, package provenance review, and a check for downstream republishing or registry abuse. Fast invalidation matters more than waiting for full forensic certainty.
👉 Read our full editorial: Npm malware keeps targeting CI/CD workflows and developer secrets