Skip to main content
Book 07 · SecurityPage 43 of 50

Supply Chain Attack

Updated 3 min read

Share this page

Send the link, quote the definition with a link back, or show it as a card on your own site.

https://softwaredictionary.org/terms/supply-chain-attack

In short

A supply chain attack compromises software through something it relies on, like an open-source package, a build tool or an update server, not the app itself.

What is a software supply chain attack?

Modern applications are assembled from hundreds or thousands of third-party pieces: open-source packages, container base images, CI/CD services, build plugins, and vendor updates. A software supply chain attack slips malicious code into one of those pieces so that it flows downstream into every project that uses it. Because the code arrives through a trusted channel, often signed and installed automatically, it can reach thousands of organizations at once.

Common techniques include typosquatting, which means publishing a malicious package with a name close to a popular one; dependency confusion, which means publishing a public package with the same name as a company's internal one so the build picks the wrong source; taking over a maintainer's account to release a poisoned version; and compromising a build system so that official releases contain a backdoor. Well-known cases include the 2020 SolarWinds breach, where attackers modified a vendor's software update, and the 2024 xz Utils backdoor, where a contributor spent more than two years gaining trust before hiding malicious code in a widely used compression library.

Defenses aim to know, pin, and verify what you ship. Teams commit lockfiles so builds use exact versions, review new dependencies before adding them, scan for known CVEs, generate a software bill of materials (SBOM) that lists every component, verify the signatures and provenance of packages and images, and harden CI pipelines with least-privilege tokens. It is like a restaurant that keeps its own kitchen spotless but still makes guests sick because of a contaminated delivery: the safety of the meal depends on every supplier, not just the cook.

A supply chain attack is often confused with an ordinary vulnerable dependency. A vulnerable dependency contains an accidental bug that attackers might exploit, while a supply chain attack is deliberate: someone intentionally inserts malicious code into a trusted component. Both are managed through good dependency hygiene, but supply chain attacks also require checking who publishes your code and how it was built.

Key takeaways

  • Supply chain attacks compromise a trusted dependency, tool, or update to reach its users.
  • Typosquatting, dependency confusion, account takeover, and build compromise are common methods.
  • Lockfiles and pinned versions make builds reproducible and harder to tamper with.
  • An SBOM lists every component so exposure to a new vulnerability can be checked quickly.
  • Verify signatures and provenance, and give CI pipelines only the permissions they need.

Example

Basic supply chain hygiene in a Node.js projectbash
# Install exactly what the lockfile says; fail if it doesn't match package.json
npm ci

# Check installed dependencies for known vulnerabilities
npm audit --audit-level=high

# Verify registry signatures and provenance attestations of installed packages
npm audit signatures

# Generate a software bill of materials (SBOM) in CycloneDX format
npm sbom --sbom-format cyclonedx > sbom.json

Readers ask

What is dependency confusion?

Dependency confusion is an attack where someone publishes a package to a public registry with the same name as a company's private internal package, often with a higher version number. Misconfigured build tools then download the public, malicious package instead of the internal one.

What is an SBOM?

A software bill of materials is a machine-readable inventory of every component and version in a piece of software, commonly in the SPDX or CycloneDX format. When a new vulnerability is announced, an SBOM lets teams find affected systems in minutes.

How can I protect my project from supply chain attacks?

Use lockfiles and pinned versions, add dependencies sparingly and review them, enable two-factor authentication on package registry accounts, scan for vulnerabilities, and verify signatures where available. In CI, limit token permissions and pin third-party actions or plugins to exact versions.

See also

Spotted a mistake or something missing on this page?Suggest an edit

Read a random page
Open today's review
Switch to the dark theme
Read this page in Türkçe

More

Settings