Glossary

Malicious Package.

Also called malicious packages, poisoned package, malicious dependency, malicious npm package

In Short

A malicious package is a software package that has been made or changed to carry harmful code, then shared through a package source that developers trust. Developers who add it as a dependency can pull that code into their own software.

Last updated October 9, 2026
Profile MapGlossary Term
  1. Also Called4other namesmalicious packages · poisoned package · malicious dependency
  2. Related Terms3linked entriesSupply chain attack · Typosquatting

What is a malicious package?

A package is a bundle of reusable code that developers add to their projects. Open-source packages are shared through public registries, and the tools that fetch them include npm and pip. A malicious package carries harmful code. The harmful code may come from a package made to look useful, or from a real package that an attacker altered.

MITRE ATT&CK describes this under compromising software dependencies and development tools. It says adversaries may manipulate software dependencies and development tools before the user receives them. It lists compromising popular open-source packages, typosquatting, and targeting CI/CD pipelines such as GitHub Actions. CI/CD pipelines are the automated steps that build and deliver software.

How does it work?

MITRE describes dependency poisoning of widely used packages in registries such as npm and pip. It also describes re-registering removed or abandoned packages to distribute malware, and using names similar to legitimate libraries to deceive developers.

For detection, MITRE points to suspicious package manager activity, such as unexpected file writes to dependency directories and unusual network connections to unfamiliar registries after install lifecycle hooks run. Lifecycle hooks are scripts that run automatically around an install.

What does a real case look like?

CISA published an alert about a self-replicating worm in the npm ecosystem that compromised over 500 packages. CISA says the malware scanned environments for sensitive credentials, including GitHub personal access tokens and API keys for AWS, GCP and Microsoft Azure. It says the worm used an automated process to spread by authenticating to the npm registry as the compromised developer and injecting code into other packages.

Why does it matter?

A malicious package arrives through a channel developers already trust, so it may not look like an attack. Reasoning cautiously, one package can be a dependency of many applications, so a single change can reach many users. In the case CISA described, the stolen credentials were also used to spread the code further. This is a reason to treat dependencies as part of your attack surface.

How can you reduce the risk?

These steps come from MITRE and CISA.

  • Lock dependencies to specific versions instead of pulling the latest release, and pin GitHub Actions to a specific commit hash rather than a tag or branch.
  • Require developers to pull from internal repositories of verified and approved packages rather than external ones.
  • Keep software updated and monitor vulnerability sources, with automated code review tools.
  • Audit dependencies through lock files, rotate developer credentials and enforce phishing-resistant multifactor authentication on developer accounts, as CISA advised in the npm alert.

Is a malicious package the same as a vulnerable package?

No. A vulnerable package has an honest flaw that could be abused. A malicious package has been built or changed to cause harm.

Is it the same as a supply chain attack?

Not exactly. A supply chain attack is the wider idea of attacking through a supplier or a component. A malicious package is one common way it can happen. Related terms are supply chain attack, typosquatting and SBOM.

Sources

  • MITRE ATT&CK: MITRE ATT&CK says adversaries may manipulate dependencies and development tools before users receive them, including open-source packages, typosquatting and CI/CD….
  • CISA: CISA alert on a self-replicating npm worm that harvested credentials and injected code into other packages, with recommendations to pin versions, rotate credentials….

Also Called.

  • Namemalicious packages
  • Namepoisoned package
  • Namemalicious dependency
  • Namemalicious npm package

Questions.

  • What is a malicious package?

    A malicious package is a software package that has been made or changed to carry harmful code, then shared through a package source that developers trust. Developers who add it as a dependency can pull that code into their own software.

  • How do malicious packages get into software?

    MITRE describes dependency poisoning of widely used packages in registries such as npm and pip, re-registering removed or abandoned packages, and using names similar to legitimate libraries to deceive developers.

  • How can you detect a malicious package?

    MITRE points to suspicious package manager activity, such as unexpected file writes to dependency directories and unusual network connections to unfamiliar registries after install lifecycle hooks run.

In Our Research

  1. 1 Nx Console and GitHub: dev tools as an entry path October 2026
  2. 2 Cyber incidents of 2026: lessons from official reports October 2026
  3. 3 Bybit theft: what it teaches about supplier access October 2026
  4. 4 The Rise of Supply Chain Cyber Attacks: How Vendor Trust Becomes the Way In July 2026
  5. 5 MCP Server Security: 10 Protocol-Level Attack Scenarios Behind the “Install and Run” Speed March 2026
  6. 6 Understanding Supply Chain Attack Tactics with Case Study October 2025