Software Supply Chain Attack Examples and What They Teach Us

CVE Studies
Guides Written

After reading this guide

At a Glance

  • A supply chain attack compromises the build, dependency, or repo - not your app code - then ships malicious artifacts to every downstream consumer.
  • SolarWinds, Codecov, xz, Log4Shell, and dependency confusion each followed the same kill chain: compromise -> ship -> reach downstream.
  • The recurring root causes are weak CI credentials, unsigned artifacts, unpinned dependencies, and no provenance or SBOM to detect drift.
  • Defenses converge on SBOM + provenance (SLSA, Sigstore, in-toto), least-privilege CI, dependency scanning, and curated/verified images.
  • Runtime attestation (VEX, RBOM®) closes the loop by proving what actually runs versus what was built.

Software supply chain attacks happen when an attacker compromises the build, dependency, or repository that feeds your software, then rides that trust downstream to every consumer. The best-told examples - SolarWinds, Codecov, xz, Log4Shell, and dependency confusion - expose one repeatable kill chain and a shared set of defenses: SBOMs, provenance, least privilege, and verified images.

What Is a Software Supply Chain Attack?

A software supply chain attack targets the path your code takes from source to running workload, rather than the workload itself. The attacker breaks into something your software trusts - a build server, a package registry, a source repository, a dependency, or a container base image - then ships malicious or vulnerable artifacts under a name your consumers already trust.

This is why such attacks are so damaging: the compromise is invisible at the application layer, yet every consumer of a poisoned component inherits the same risk. Each link in that assembly is a potential injection point.

How Does the Supply Chain Kill Chain Work?

A kill chain maps out the steps that an attacker takes to execute an attack. Nearly every documented supply chain attack follows the same three-stage kill chain:

  1. Compromise a link. The attacker gains control of a build system, a dependency package, a source repo, or a signing key.
  2. Ship malicious or vulnerable content. The attacker injects code or publishes a trojaned version that passes normal validation because it carries the trusted name.
  3. Reach downstream. The poisoned artifact is pulled in automatically by builds, package managers, or image pulls.

The defender must win every time across every dependency, while the attacker only needs to win once. That asymmetry is what makes prevention far more cost-effective than detection alone.

What Can the SolarWinds Breach Teach Us?

The SolarWinds breach is the canonical supply chain attack. Attackers compromised the build environment of the Orion network management product and inserted malicious code into the build process itself. The trojaned updates were then signed with SolarWinds' own legitimate certificate and pushed to customers as routine software updates.

The lesson is that the build system is a privileged attack path. If an attacker controls the build, they control the output - and a valid signature only proves the artifact came from that build, not that the build was honest. This is exactly why frameworks such as SLSA (Supply-chain Levels for Software Artifacts) exist: they grade builds on how well the environment is isolated, auditable, and tamper-resistant, so a signed artifact carries real meaning.

What Did Codecov Reveal About Credential Exposure?

Codecov was a supply-chain attack delivered through a compromised CI integration. Attackers obtained credentials that let them alter Codecov's uploader script - a small bash script that thousands of teams ran inside their own CI pipelines to report test coverage. Because the uploader ran with access to environment variables and tokens, the altered script could exfiltrate secrets from countless downstream CI environments.

The case shows two things. First, a dependency that runs inside your trusted CI context inherits your CI's privileges. Second, a tiny, overlooked component can become a high-value target because it is ubiquitous and trusted. The defense is least privilege in CI: scope tokens narrowly, rotate them, and verify the integrity of tooling you pull at build time. Frameworks like in-toto can attest that build steps ran as expected, and Sigstore can sign and verify the artifacts those steps produce.

What Made the xz/utils Backdoor So Dangerous?

The xz backdoor (CVE-2024-3094) was an attempted upstream compromise of a widely used compression library. A maintainer with malicious intent introduced code that, when built with certain conditions, opened a backdoor in the SSH service of affected systems via a poisoned shared library. The payload was hidden in test data and only activated through a specific build configuration, evading casual review.

This example targeted an open-source maintainer ecosystem directly. It showed that social engineering of maintainers and long-game infiltration of a project can be as effective as breaching a company. The protections that would have contained it include reproducible builds, independent verification of release artifacts, SBOMs that pin exact component versions, and runtime attestation to confirm the running library matches the reviewed source. It also reinforced why provenance (SLSA) and artifact signing (Sigstore) matter even for libraries that never reach a container registry.

What Does Log4Shell Tell Us About Transitive Risk?

Log4Shell (CVE-2021-44228) was not a deliberate supply chain injection, but it is the clearest lesson in transitive dependency risk. A critical remote-code-execution flaw lived in a logging library, Log4j, that most teams had never directly installed. It reached them transitively - pulled in silently by other dependencies deep in their application trees.

When the vulnerability was disclosed, organizations could not answer a basic question: "Do we ship this component anywhere?" Teams without an accurate SBOM had no fast way to find the blast radius, while those with SBOMs located affected images in minutes. Log4Shell is why SBOM generation and continuous vulnerability scanning are now baseline controls, and why VEX (Vulnerability Exploitability eXchange) documents matter: they let a vendor state whether a listed CVE is actually exploitable in your configuration, cutting false-positive noise.

How Do Dependency Confusion and Typosquatting Work?

Dependency confusion and typosquatting are supply chain attacks aimed at the package install step. In a dependency confusion attack, an attacker publishes a package to a public registry using the same name as a private internal package. If the build tool searches public registries first, it may pull the attacker's version. Typosquatting is simpler: the attacker publishes a package one character off from a popular library, betting that a tired engineer will mistype it.

Both attacks exploit the fact that build tools trust names. The defenses are concrete: pin dependencies to exact versions and hashes, configure private registries with strict precedence, use internal mirrors for verified packages, and run dependency scanning that flags unexpected or new packages. Curated, verified base images reduce the surface further by shrinking the set of packages your build ever pulls from the open internet.

Which Defenses Actually Stop These Attacks?

The defenses that map to the kill chain are well established and increasingly standardized:

  • SBOM (Software Bill of Materials): a complete, machine-readable inventory of every component. It turns "do we ship this?" from a guess into a query, and it is the foundation for vulnerability and provenance checks.
  • Provenance and signing: SLSA defines how trustworthy a build is; Sigstore (cosign, Fulcio, Rekor) provides keyless signing and a transparent log; in-toto attests that build steps ran as declared.
  • Least privilege in CI: narrow tokens, short lifetimes, isolated runners, and verified tooling prevent a single compromised script from harvesting your whole pipeline.
  • Dependency scanning: continuous scanning of direct and transitive dependencies, pinned by version and hash, with VEX to separate real risk from noise.
  • Curated and verified images: hardened, rebuilt, and signed base images remove large classes of inherited CVEs before your build starts.
  • Runtime attestation: proving at runtime that what is running matches what was built, closing the loop between build-time intent and deploy-time reality.

Defense-in-depth is what contains a breach when prevention is not perfect.

How Does RapidFort Reduce Inherited Supply Chain Risk?

RapidFort approaches the supply chain problem from the angle of attack-surface elimination rather than detection alone, continuously eliminating up to 99.9% of CVEs in container images and up to 90% of software attack surface without code, OS, or pipeline changes.

Three capabilities map directly to the defenses above:

  • Curated Near-Zero CVE Images: a catalog of tens of thousands of hardened images for Alpine, Debian, UBI, and Ubuntu LTS - including STIG and FIPS variants - rebuilt every 24 hours. A verified, near-zero-CVE base image removes the bulk of inherited risk before your application code is added.
  • Curated Libraries: A comprehensive catalog of malware-scanned open-source libraries to help organizations prevent supply chain malware before it reaches development pipelines or production environments.
  • RapidFort Analyzer: performs deep image analysis and generates a complete SBOM for every image. That SBOM is the inventory you need to answer blast-radius questions like the ones Log4Shell forced on unprepared teams, and it drives exploit-aware prioritization that reduces vulnerability noise by roughly 20-25% versus traditional scanners.
  • RapidFort Profiler: provides real-time runtime visibility into container behavior, revealing which components actually execute so that you can focus on real attack surface instead of theoretical CVEs.
  • RapidFort Optimizer: removes unused components to shrink container attack surface.
  • RapidFort CART: provides continuous compliance validation using OpenSCAP against STIG, CIS, NIST, and custom baselines, with drift detection and audit-ready evidence in JSON, CSV, HTML, and XML.
  • RapidFort Runtime: it lets you know exactly what is running live in production; it detects what changes and identifies and addresses new risks before they become incidents.

FAQ

What is the most common software supply chain attack vector?

The most common vector is a compromised build or CI system, followed closely by a poisoned dependency. In both cases the attacker inserts malicious or vulnerable content upstream of the consumer, so it arrives already bearing a trusted name and signature.

How does an SBOM help prevent supply chain attacks?

An SBOM is a complete inventory of every component in your software. It lets you instantly locate affected images when a new CVE or malicious package is disclosed, turning a weeks-long manual hunt into a fast query - and it is the foundation for provenance and VEX checks.

What is the difference between SLSA and Sigstore?

SLSA defines how trustworthy a build process is, grading it on isolation and auditability. Sigstore provides the tooling to sign and verify artifacts and record them in a transparent log. They are complementary: SLSA sets the standard, Sigstore implements verifiable provenance.

Can curated base images eliminate supply chain risk entirely?

No single control eliminates all risk. Curated near-zero-CVE images remove the large majority of inherited vulnerabilities before your build starts, but you still need SBOMs, provenance, dependency scanning, curated libraries, and runtime validation to cover the full kill chain.

What is VEX and why does it matter?

VEX (Vulnerability Exploitability eXchange) is a machine-readable document from a vendor stating whether a known CVE is actually exploitable in a given product configuration. It separates real risk from noise, which is essential for prioritizing the vulnerabilities that genuinely matter.

reading image
Reading Progress
Introduction
SECTIONS
01: Introduction
02: What is an Assessment?
03: Why It Matters
04: Types of Assessment
05: The Problem with Traditional Tools
06: A Modern Approach
07: Reduce Your Attack Surface
Download PDF
download icon