Software supply chain security

Hand-drawn bright terracotta cords weaving over and under a dense braid of finely hatched sand, umber and moss cords.

Software supply chain security protects an application against risks in the third-party code it is built from: open-source libraries, the packages they pull in, and their registries. In one study, about two thirds of Node.js applications depended on at least one package with a known vulnerability. Researchers dispute how much of that vulnerable code an application ever runs (Alfadel et al., 2020; Mir et al., 2023; Zhang et al., 2024c). Fixes travel slowly through chains of dependencies, and attackers also publish deliberately malicious packages, counted in the thousands (Kapelke, 2022; Zhou et al., 2024a). The defences studied most are update bots, malware detectors, package signing and security scores, and studies of the scores disagree on whether better-scored projects have fewer vulnerabilities (Mohayeji Nasrabadi et al., 2025; Schorlemmer et al., 2024; Zahan et al., 2023; Zahan et al., 2025).

Supply chains in breach data Weak evidence: few or small studies support this

Compromise through suppliers ranks among the leading ways into an organisation in at least one vendor’s breach data. In IBM’s 2025 study of 600 organisations, a vendor report, supply-chain compromise was the second most common way in. It started nearly 15% of breaches, behind phishing at 16% (Kapko, 2025). How far such reports can be trusted, and why they disagree, is covered in Data breaches.

How common vulnerable dependencies are Weak evidence: few or small studies support this

A dependency is a package an application uses; a transitive dependency is one pulled in by another dependency rather than chosen directly. In one study of 6,673 Node.js applications, 67.93% depended on at least one vulnerable npm package (Alfadel et al., 2020). The same authors classed 94.91% of those vulnerable packages as low threat, on a three-level scale they defined from each vulnerability’s lifecycle (Alfadel et al., 2020).

Is the vulnerable code reachable?

Studies disagree on how much of the vulnerable code in dependencies an application can actually reach. A vulnerability in a dependency only matters if the application calls the flawed code, directly or through other packages. Reachability analysis checks this by building a call graph, a map of which functions can call which.

Analyses at the level of functions find far fewer exposed projects than counts at the level of packages. In the Maven ecosystem for Java, under 1% of packages had a reachable call path to vulnerable code in their dependencies, far below a count of vulnerable dependencies alone (Mir et al., 2023). An earlier study found about 20% of dependencies affected by a known vulnerability were not deployed at all, so could not be exploited in practice (Pashchenko et al., 2018).

These low figures may undercount. Call graphs built from source code without running it produce both false positives and false negatives on real projects, so a reachability filter can miss real calls (Foo et al., 2019). Among 3,147 Java projects that already used vulnerable libraries, a method-level study found 21.51% threatened through vulnerable functions. The studies count different things, so the figures are not directly comparable (Zhang et al., 2024c).

Deciding which vulnerabilities to fix first is itself unsettled. Four public scoring systems, including the Common Vulnerability Scoring System (CVSS) and the Exploit Prediction Scoring System (EPSS), ranked the same 600 Microsoft vulnerabilities in significantly different ways (Koscinski et al., 2025).

How slowly fixes spread

Fixed versions reach the applications that need them slowly, and more slowly the further down a chain of dependencies they must travel. Across more than 1,000 open-source projects, a critical vulnerability in a dependency stayed on average for over a year before being fixed (Kumar et al., 2025a). Some packages took months or longer to replace known vulnerable dependencies (Rahman et al., 2024b).

The Log4Shell vulnerability in the Log4j library shows the effect of depth. In a 2022 analysis, under 5% of library versions on Maven Central used the fixed Log4j version (Kapelke, 2022). The fix rate fell with each dependency hop, from about 9% of libraries one hop away to below 1% by the fifth hop (Kapelke, 2022).

In Maven, most adoptions of security releases come after a flaw is public. Of 1,677 observed adoptions, 85.3% came after the flaw appeared in the National Vulnerability Database (NVD), a public catalogue (Hasan et al., 2026a).

Automated dependency updates

Update bots, such as GitHub’s Dependabot, open pull requests (proposed code changes) that move a project to newer dependency versions. Projects that use them update faster, but the studies observe projects rather than assigning the bot at random, so they show an association, not a cause (He et al., 2022; Hasan et al., 2026a).

After adopting Dependabot, projects reduced their technical lag, the distance between the versions they use and the latest ones, and developers were receptive to its pull requests (He et al., 2022). Not all kept it: 11.3% of projects dropped it for other tools (He et al., 2022).

Security updates from a bot are usually merged within days, but the cases where they are not can leave projects exposed for months. In mature JavaScript projects, developers who did not merge a Dependabot security update usually fixed the vulnerability by hand, which could take months (Mohayeji Nasrabadi et al., 2023; Mohayeji Nasrabadi et al., 2025). In Maven, releases adopted through Dependabot version updates had a median delay of 10.4 days, against 110.6 days without it; but only 8.5% of adoptions had the bot configured (Hasan et al., 2026a).

Malicious packages

Besides flaws, attackers publish packages built to do harm, and registries host them in the thousands. A 2020 study found 339 new malicious packages on PyPI (Python), npm (JavaScript) and RubyGems (Ruby); maintainers confirmed 278 of those reported, 82% (Duan et al., 2020). A 2024 dataset gathered 24,356 malicious packages; its sources overlapped little, and many packages reused similar code (Zhou et al., 2024a).

Malicious packages reach users mainly through ordinary installation and stay available after discovery. On PyPI, 74.81% of malicious packages entered end-user projects through source code installation. Over 72% of reported ones stayed on mirror servers for an extended period after being found (Guo et al., 2023). On npm, 80.3% of malware made no attempt to evade detection, which the authors attribute to the lack of mandatory scanning before publication (Guo et al., 2026c).

Detecting malicious packages

Recent detectors score well on research benchmarks, but the results come mostly from preprints, and false alarms remain the obstacle at registry scale. Accuracy here is often given as F1, a score from 0 to 1 (or 0% to 100%). It combines how many malicious packages a tool catches with how many of its alerts are correct.

Older checks raised far too many false alarms. On PyPI, existing malware checks had false positive rates of 15% to 97%, and raising their thresholds made them miss too much to be useful (Vu et al., 2022). PyPI’s administrators considered even a 0.01% false positive rate unacceptably high, given the number of releases (Vu et al., 2022).

Newer tools report much better figures. On a benchmark of 6,420 malicious and 7,288 benign npm packages, the best tool reached an F1 of 95.98%. The best conventional tool reached 93.32%, and combinations of detectors up to 97.02% (Guo et al., 2026c). A tool that runs packages to watch their behaviour reached F1 of 0.95 on npm and 0.91 on PyPI (Zheng et al., 2024b). On benign packages that look malicious, it cut false positives from 34.63% to 2.57% on npm against other tools (Zheng et al., 2024b).

Signing, install scripts and SBOMs Weak evidence: few or small studies support this

Evidence on defences other than detection is thin, and registry policy shapes adoption more than attacks do. In a quasi-experiment across four public registries, mandating signatures raised the number of signed packages, and dedicated tooling raised the quality of signing (Schorlemmer et al., 2024). Signing adoption followed registry policy rather than public knowledge of attacks (Schorlemmer et al., 2024).

Install scripts are code a package runs as it is installed, and blocking them is a common proposal. The npm tools let users block them, but the npm team argues attackers would then move the payload into package code that runs soon after installation (npm, 2018).

A software bill of materials (SBOM) is an inventory of the components in a piece of software. SBOMs are described as a building block of supply chain transparency, yet how practitioners perceive them and what hinders their adoption was unclear as of 2023 (Xia et al., 2023).

Security practice scores Contested: studies disagree on this

Studies disagree on whether projects that follow recommended security practices have fewer vulnerabilities. The OpenSSF Scorecard, from the Open Source Security Foundation, rates open-source projects automatically on such practices, such as code review. Researchers who study it note that little is known about whether such best practices improve security (Zahan et al., 2025).

The first large study found the opposite of the expected link. In 2,422 npm and PyPI packages, reported vulnerabilities rose rather than fell as the aggregate score rose (Zahan et al., 2023). The practices explained 9% to 12% of the variation in vulnerability counts (the R² of the models), so the scores predicted little either way (Zahan et al., 2023). The same group later attributed this to a small dataset, sparse vulnerability data and missing control variables (Zahan et al., 2025).

A larger follow-up found the expected direction. In about 145,000 npm packages, higher aggregate adoption of the practices went with 5.2 fewer vulnerabilities and faster remediation and update times (Zahan et al., 2025). Some single practices still pointed the other way: code review was associated with more reported vulnerabilities (Zahan et al., 2025).

The outcome these studies measure is itself uncertain. How many vulnerabilities are reported depends on how much effort goes into finding them, and reports do not record that effort (Ozment & Schechter, 2006). A vendor analysis of Scorecard data found it incomplete and noisy, with many checks unrelated to vulnerabilities; its strongest correlate of vulnerabilities was having no dependency update tool configured (Veracode, n.d.).

Further reading

  • Pashchenko and colleagues (2018), “Vulnerable open source dependencies: counting those that matter” (Pashchenko et al., 2018): the case that raw counts of vulnerable dependencies overstate risk.
  • Zhang and colleagues (2024) (Zhang et al., 2024c): a method-level study of projects that already use vulnerable libraries, which finds 21.51% threatened.
  • Mohayeji Nasrabadi and colleagues (2025) (Mohayeji Nasrabadi et al., 2025): what happens to Dependabot security updates in practice, including those never merged.
  • Guo and colleagues (2026) (Guo et al., 2026c): an independent comparison of npm malicious package detectors on one benchmark.
  • Zahan, Rahman and Williams (2025) (Zahan et al., 2025): the largest test of whether OpenSSF Scorecard practices go with fewer vulnerabilities, with a review of earlier results.

Known gaps

What this article cannot tell you yet.

  1. No study measuring vulnerability exposure or exploited vulnerabilities before and after adopting an update bot was found, and the Renovate bot was not studied.
  2. The share of dependency vulnerabilities that attackers exploit in practice was not found in a peer-reviewed measurement.
  3. The measured false-negative rate of reachability tools, which would settle how far they undercount, was not found.
  4. No evaluation of lock files, version pinning or install-script blocking against malicious packages was found.
  5. Evidence that software bills of materials (SBOMs) reduce vulnerabilities or speed up responses was not found; the research on them covers practitioners’ views.
  6. No figure for the incidence of malicious packages on npm after 2022 was found.

References

Solid source
Rated highly trustworthy by the research, and every passage taken from it was found in it.
Weak source
Rated low, or a passage taken from it was not found in it.
Medium trust
Rated medium by the research.
Not checked
Rated high, but its passages could not all be checked against it.
Show all 27 references