TL;DR: In 2025, 3,180 confirmed malicious packages were reported, with the heaviest activity in October, November, and December and a clear shift toward automated multi-version publishing, enterprise tool impersonation, and CI/CD-targeted supply-chain abuse, according to Xygeni. The pattern shows that registry trust, version history, and basic scanning are no longer enough to contain package-led compromise.
At a glance
What this is: This annual recap from Xygeni shows that malicious open-source packages became persistent and industrialised in 2025, with 3,180 confirmed packages and a clear bias toward automated publishing and developer-workflow targeting.
Why it matters: Security and identity teams should treat package ecosystems as an access-path problem, because CI/CD, developer tooling, and secrets exposure can turn a dependency install into a control failure.
Context
Malicious packages are code published into trusted ecosystems to trick developers, build systems, or downstream applications into installing attacker-controlled payloads. In this article, the core problem is not just malware volume, but the way package distribution now exploits the trust boundaries around CI/CD, version history, and developer tooling.
For identity and access teams, the governance angle is clear: package installs often execute with access to secrets, tokens, and pipeline credentials. That makes open-source malware a non-human identity problem as much as a software supply-chain problem, because compromised build contexts can expose machine credentials and automation trust in one step.
Key questions
Q: What breaks when malicious packages can publish many near-identical versions?
A: Reputation-based review breaks first, because repeated releases can look like healthy maintainer activity even when they are used to evade detection. Manual triage also slows down, and defenders end up checking volume instead of trustworthiness. The safer model is to score release behaviour, not just package age or registry presence.
A: Malicious packages are dangerous because they execute where developers compile and install software, which often gives them access to source, build environments, and inherited secrets. That proximity lets attackers probe for credentials, steal tokens, and move toward production systems. Once a package runs during build, the blast radius can extend far beyond the codebase itself.
Q: How do security teams know whether a malicious package has spread across the environment?
A: They need cross-application visibility that ties package names, versions, and dependency relationships to deployed assets. Without that mapping, response teams spend critical time searching manually, and containment decisions are delayed while the worm continues to propagate through trusted channels.
Q: Should organisations prioritise package control over post-install scanning?
A: Yes, when the package can execute during installation. Post-install scanning still has value, but it arrives after the most dangerous trust boundary has already been crossed. Organisations should prioritise controls that prevent untrusted code from running in environments that contain secrets or production-connected credentials.
Technical breakdown
How automated multi-version publishing evades registry trust
Attackers increasingly publish many small variants of the same malicious package so that each version looks like routine maintenance rather than an obvious compromise. That pattern weakens reputation-based review because age, version count, and repeated releases can be mistaken for legitimacy. In a package ecosystem, the registry becomes a distribution channel, not a trust signal, and automated publishing can outpace manual triage. For defenders, the technical issue is not whether a package exists in a registry, but whether its release pattern matches normal maintainer behaviour.
Practical implication: Treat unusual release cadence and repeated re-uploads as detection inputs, not evidence of legitimacy.
Why DevTools impersonation is effective in CI/CD environments
Malicious packages that mimic admin tools, telemetry libraries, or build extensions exploit familiarity. Developers and pipeline owners often grant these names less scrutiny because they resemble internal utilities or common workflow components. That matters because CI/CD jobs frequently run with broad access to code, logs, and secrets, which turns a single install into a high-value execution point. The abuse here is not just social engineering, but trust hijack at the automation layer, where software identity is accepted too quickly.
Practical implication: Inventory trusted build-time packages and flag any new dependency that imitates internal tooling or operational extensions.
How package installs become secrets-exposure events
Open-source malware often succeeds because install-time execution occurs before runtime protections see anything suspicious. If a package can read environment variables, configuration files, or token stores during install, it can exfiltrate credentials before the workload is fully provisioned. This is especially relevant to NHI governance, because build systems, service accounts, and CI runners frequently hold non-human credentials that are not protected like interactive user access. The core failure is assuming installation is a passive step when it is often an execution boundary.
Practical implication: Reduce secret exposure in build contexts and separate package installation from any environment that holds reusable credentials.
Threat narrative
Attacker objective: The attacker wants to reach developer and pipeline trust zones, steal secrets, and turn ordinary package installs into a durable supply-chain foothold.
- Entry occurs through malicious packages published into npm, PyPI, and similar ecosystems, often using typosquatting, impersonation, or automated version pumping to attract installs.
- Credential and token access happens when install scripts or loaders read .npmrc, .pypirc, environment variables, or other pipeline secrets during CI/CD execution.
- Impact follows when the malicious package executes in developer or build environments, enabling exfiltration, persistence, or downstream compromise across software supply chains.
Breaches seen in the wild
- Shai Hulud npm malware campaign: Shai Hulud campaign: npm malware exposed secrets on GitHub.
- PyPI secrets exposure 2023: Researchers found 3,938 unique secrets in published PyPI packages, 768 still valid; a new release or yank does not remove them.
Read and download The State of NHI & AI Agent Breach Report 2026, covering 200+ breaches impacting Non-Human Identities including AI Agents.
NHI Mgmt Group analysis
Package ecosystems have become an access layer, not just a distribution layer. Once build systems install third-party code with secret access, the package registry is effectively part of the trust perimeter. The article's evidence shows attackers are optimising for automation, not user endpoints, which makes CI/CD governance the real control surface. Practitioners should treat dependency intake as privileged execution.
Multi-version publishing is a governance failure mode, not just a noise problem. Repeated releases can create false confidence because traditional review models often interpret activity as maintainer legitimacy. That assumption is now unreliable when attackers can industrialise publishing at scale. Security teams need controls that assess behavioural consistency, not just package presence.
Credential exposure inside build workflows is the NHI angle that matters most. Service accounts, tokens, and pipeline secrets are being handed to code that has not earned that trust. This is a machine-identity problem because the compromised actor is often a non-human credential with broader rights than any individual developer session. The practitioner conclusion is simple: package installs must never inherit more access than the task requires.
Industrialised malicious code changes the economics of detection. If attackers can flood registries with near-identical variants, static allowlisting and basic scanner signatures will lag by design. The article reinforces that behavioural controls and pipeline enforcement now carry more weight than delayed reporting. Teams should expect package abuse to remain persistent, adaptive, and focused on build-time execution.
Supply-chain defence needs a named concept for this pattern: build-time trust collapse. That is the point at which a dependency is accepted as routine code but behaves like an execution vector with credential access. The implication is broader than package hygiene, because any environment that conflates install trust with runtime trust will continue to leak machine credentials. Practitioners should redesign controls around issuance, isolation, and build-time containment.
What this signals
Build-time trust collapse: the most important change in 2025 package malware is that dependency intake now behaves like a privilege decision, not a simple software fetch. That shifts control ownership toward pipeline security, secrets governance, and non-human identity containment.
Security teams should assume that malicious packages will continue to use automation, version inflation, and internal-tool impersonation because those techniques scale better than one-off payloads. The practical response is to constrain what package installs can touch, then verify that build runners cannot expose reusable credentials during execution.
For practitioners
- Enforce lockfile-only installs in CI/CD Use npm ci or pip install --require-hashes so the dependency tree cannot drift during build execution. Pair that with immutable lockfile review for any dependency that changes version rapidly or appears in a suspicious burst of releases.
- Harden build environments against secret exposure Run package installation in containers or runners that do not contain long-lived tokens, broad environment variables, or writable secret stores. Keep build-time credentials isolated from package execution contexts.
- Block builds on suspicious package behaviour Fail the pipeline when a package shows obfuscation, unexpected install hooks, unpublished maintainer changes, or IOC matches. Behaviour-based blocking matters more than waiting for signature updates.
- Monitor registry and maintainer anomalies Watch for sudden maintainer swaps, excessive publish frequency, and version inflation patterns such as rapid patch jumps or fake internal-release numbering. Treat those signals as supply-chain risk indicators, not normal release hygiene.
- Validate SBOMs against malicious package intelligence Generate SBOMs for each build and compare them against known malicious package indicators so direct and transitive dependencies are checked before promotion into later stages.
Key takeaways
- Malicious package campaigns in 2025 were not isolated events but a scaled pattern of supply-chain abuse aimed at developer and build environments.
- The key control failure is treating package installation as low-risk when it often executes with access to secrets, tokens, and automation credentials.
- Defence needs to move toward build-time containment, behavioural detection, and tighter control of non-human credentials inside CI/CD pipelines.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
MITRE ATT&CK addresses the attack and risk surface, while CIS Controls v8, NIST CSF 2.0 and SLSA set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| MITRE ATT&CK | TA0002;TA0006;TA0010 — Execution; Credential Access; Exfiltration | Package malware executes during install, steals secrets, and exfiltrates data from build contexts. |
| Recommendation — Map install-time package abuse to execution, credential access, and exfiltration techniques in detection and triage. | ||
| CIS Controls v8 | CIS-5 — Account Management | Build runners and service accounts are the access layer abused by package malware. |
| Recommendation — Review build and pipeline account scope, then remove any access not required for package installation. | ||
| NIST CSF 2.0 | PR.AA-05 — Access Permissions, Entitlements and Authorizations | The article centers on overly trusted CI/CD access paths that malicious packages exploit. |
| Recommendation — Enforce least-privilege permissions for CI/CD runners and package-install contexts. | ||
| SLSA | L3 — Build integrity | The article focuses on build-chain abuse and the need for stronger provenance controls. |
| Recommendation — Adopt stronger build provenance checks before promoting artifacts created from third-party dependencies. | ||
Key terms
- Malicious Package: A malicious package is software published into a legitimate repository but designed to execute harmful code when installed. It abuses normal dependency workflows so that the attacker’s code reaches the environment through trust in the package ecosystem, not through a traditional exploit.
- Version Inflation: Version inflation is an evasion tactic where attackers publish many releases or unrealistic version numbers to make malicious packages look mature, active, or trustworthy. It weakens simple reputation-based review because the package appears to have an established release history.
- Build-Time Trust Boundary: A build-time trust boundary is the line that separates dependency installation and compilation from access to sensitive credentials or production systems. When that boundary is weak, malicious packages can turn routine automation into a path for broader compromise.
- Supply Chain Abuse: Supply chain abuse is the misuse of trusted third-party software, services, or dependencies to gain unauthorized access or distribute malicious activity. It exploits inherited trust across vendors, code libraries, update channels, or managed services, allowing attackers to reach targets indirectly through a weaker link in the delivery chain.
Deepen your knowledge
The NHI Foundation Level course, the industry's only accredited NHI security programme, covers NHI governance, workload identity, and secrets management for practitioners who need to secure non-human access paths. It helps teams connect identity controls to the broader security programme that governs build systems, automation, and machine credentials.
Published by the NHIMG editorial team on August 21, 2026.
Updated on October 12, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org