Safeguard
Supply Chain•

What is the difference between a malicious and a vulnerable package?

A vulnerable package has an exploitable flaw. A malicious package is built to harm. Why the difference changes how you find and respond to each.

Safeguard Security Team
3 min read

A vulnerable package is legitimate software with a flaw an attacker could exploit. A malicious package is built to cause harm, such as stealing credentials. You fix the first by upgrading. You handle the second as an incident, because the harm may already have happened when it was installed.

Side by side

Vulnerable packageMalicious package
Intent of the authorHonest, with a bugHostile
Typical recordCVE or advisory with affected and fixed versionsMalware report, removal, advisory
When harm occursWhen the flaw is reachable and exploitedOften at install or import
Usual fixUpgrade, patch or mitigateRemove, rotate secrets, rebuild
Severity scoreCVSS style score commonOften no score, treat as critical

How the records differ

Vulnerabilities are usually tracked with CVE identifiers and ecosystem advisories. Malicious packages have their own databases. The OpenSSF malicious packages repository describes itself as a database of reports of malicious packages, consumable in the OSV format. The OSV schema lists a MAL prefix for the Malicious Packages Repository.

This matters because a scanner that only reads CVE feeds can miss a malicious package that has no CVE. Ask your tools which sources they use, and check that malware advisories are one of them.

Why the response differs

With a vulnerability, you ask whether you are exposed. Is the vulnerable code present, and can an attacker reach it? That is where reachability analysis helps you rank fixes.

With malware, the question is whether it was ever installed and where. A fixed version may not exist, and no upgrade removes the code that already ran. Response means removal, secret rotation and a search across projects. See what to do after installing a malicious package.

Gray areas

Some cases blur the line:

  • A trusted package whose maintainer account was taken over and pushed a bad release. The package is normally legitimate, but that version is malicious.
  • A legitimate package abandoned and later transferred to a new owner. See abandoned package takeover risks.
  • A package that is dual use, such as a security testing tool.

Treat each affected version as the unit, not the package name.

Click through it at your own pace, or open it full screen. Look at how findings are grouped by package and version.

Quick check

Does a clean vulnerability scan mean no malicious packages?

No. A scan against CVE data alone can miss a malicious package with no CVE. Confirm what advisory sources your tools use.

Is a malicious package always removed from the registry?

Not immediately. Registries act after a report is confirmed, so there can be a window where the package is still downloadable.

Safeguard does SBOM and dependency scanning and reachability analysis, with a free scan if you want to try it.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.