Software Supply Chain Attack
A software supply chain attack plants malicious code in trusted software, libraries, or updates so it reaches victims through normal installs.
What is Software Supply Chain Attack?
A software supply chain attack is an intrusion where the attacker compromises a trusted vendor, open-source project, build system, or update channel so that malicious code reaches victims through software they already trust and install on purpose. The victim does nothing unusual. They apply an update or pull a library, and the malware arrives signed, packaged, and expected.
The business impact comes from scale and trust. One compromise can reach thousands of customers at once, and security tools tend to allow signed software from known vendors. The SolarWinds Orion compromise in 2020, the 3CX desktop app compromise in 2023, and the xz Utils backdoor discovered in 2024 each showed a different route into the same outcome.
Leaders should care because every organization inherits the security of its suppliers and dependencies. The practical questions are what software you run, where each component comes from, who can change it, and how fast you can find and remove a bad version once it is announced.
How Software Supply Chain Attack works
- The attacker picks a component many targets depend on, such as a popular library, a vendor's update server, or a build tool.
- They get write access. Common routes are stolen developer credentials or signing keys, a compromised build server or CI pipeline, a takeover of an abandoned package, a look-alike package name, or months of patient work to earn maintainer trust.
- They insert malicious code, often only into the released artifact rather than the visible source code, so a quick review of the repository looks clean.
- The normal pipeline builds, signs, and publishes the release.
- Customers install it through package managers or automatic updates.
- The payload checks its environment and activates only on chosen targets, or waits before doing anything, to avoid early discovery.
flowchart LR A["Attacker gains access to supplier"] --> B["Malicious code added to build or release"] B --> C["Normal build, signing, publishing"] C --> D["Customers install update or dependency"] D --> E["Payload activates on selected targets"]
Under the hood
Entry points
- Source repository: A stolen maintainer token lets the attacker push code or tamper with release tags.
- Dependencies: Typosquatting registers names close to popular packages. Dependency confusion publishes a public package with the same name as a company's internal package, and a misconfigured build pulls the public one.
- Build system: CI runners hold secrets and produce the final binaries. A compromised runner can change output without touching source code.
- Artifacts and update servers: Tampering with a registry entry or update server swaps a good file for a bad one after the build.
- Signing keys: A stolen code signing key makes malware look like an official release.
The xz Utils case (CVE-2024-3094)
Malicious code was found in the release tarballs of xz Utils 5.6.0 and 5.6.1. The source repository held obfuscated test files, and a build script that existed only in the tarballs pulled hidden object code out of them during compilation and linked it into liblzma. On Linux distributions where OpenSSH's sshd loads liblzma through systemd support, the backdoor hooked a function used during RSA authentication, which could give the holder of the attacker's key access to the system.
The person behind it had spent about two years building trust as a co-maintainer. A Microsoft engineer found it after noticing that SSH logins on a test system were using unexpected CPU time. The affected versions had mostly reached testing and rolling-release distributions, not stable releases, when it was caught.
Checks you can run
# Debian or Ubuntu: confirm which xz and liblzma versions are installed
dpkg -l | grep -E 'xz-utils|liblzma'
# Python: refuse any dependency whose hash does not match the lock file
pip install --require-hashes -r requirements.txt
What it leaves behind
The artifact that was shipped differs from what a clean, reproducible build of the same source produces. Updated software starts making network connections it never made before. Package install scripts, such as npm postinstall hooks, spawn shells or download files. A project gains a new maintainer or a new release process shortly before a suspicious release.
Framework mapping
T1195.002 covers compromise of the software itself or its distribution. T1195.001 covers poisoned dependencies and development tools. CWE-506 describes the embedded malicious code.
Common attack scenarios
- A payroll vendor's build server is compromised. A routine monthly update installs a backdoor at hundreds of customer sites, all signed with the vendor's real certificate.
- A fintech team names an internal package
acme-auth. An attacker publishes a public package with the same name and a higher version number, and a misconfigured CI job installs the attacker's code. - An open-source maintainer's account is taken over through a reused password. A patch release adds a script that reads cloud credentials from environment variables during install and sends them out.
Framework mappings
Latest real-world attacks using this technique
News stories tagged with Software Supply Chain Attack. This list updates on its own while the page is open.
- High Microsoft finds backdoors in Q-Dir and DesktopOK installersMicrosoft
- High Docker Sandboxes flaw exposes sensitive dataBleepingComputer
- High TrojanPony malware infects AI coding toolsDark Reading
- High SAP confirms cyber incident with possible source code breachThe Record
- High SAP confirms security incident with stolen GitHub tokensSecurity Affairs
- High Hackers compromise Q-Dir and DesktopOK downloadsThe Hacker News
- High SAP Investigates Cyberattack After Source Code CompromiseSecurityWeek
- High North Korea hackers poison GitHub repositories with malwareThe Hacker News
Prevention, hardening and detection
Prevention and hardening
- Keep a Software Bill of Materials (SBOM) for what you build and ask key vendors for theirs, so you can answer "are we affected" within minutes of a disclosure.
- Pin dependency versions, verify hashes from a lock file, and pull packages through a private registry or proxy that you control.
- Configure package managers so internal package names can only come from your internal registry, which blocks dependency confusion.
- Harden CI: short-lived credentials, isolated runners for release builds, required review for any change to workflow files, and protected signing keys.
- Use signed builds with provenance (SLSA levels and tools such as Sigstore) so you can prove where an artifact came from.
- Restrict outbound network access from servers. A trojanized update that cannot reach the internet cannot call home.
- Add supply chain questions to vendor reviews: how they protect build systems, signing keys, and update servers.
Detection
| Data source | What to look for | Example |
|---|---|---|
| EDR or NDR | New outbound destinations from software right after an update | Monitoring agent contacting an unknown domain after patching |
| Build logs | Install scripts that run shells or download files | npm postinstall running curl |
| Package inventory and SBOM | Versions named in a new advisory | xz-utils 5.6.1 on a build server |
| Artifact verification | Hash or signature mismatch against provenance | Release binary differs from reproducible build |
| Source control audit | New maintainers, new release processes, or force-pushed tags | Release tag moved to a different commit |
Frequently asked questions
Does code signing protect against supply chain attacks?
Signing proves which key produced a file, not that the file is safe. In several major cases the malicious update was signed with the vendor's real key because the build process itself was compromised.
What is an SBOM and why does it help?
A Software Bill of Materials lists the components and versions inside a piece of software. When a backdoored library is announced, an SBOM lets you find every affected system in minutes instead of days.
Are open-source dependencies more dangerous than commercial software?
Not by nature. Both have been compromised. Open-source code is visible, which helped expose the xz backdoor, but many projects depend on a few unpaid maintainers, which attackers can exploit with patience.
How can a small team reduce supply chain risk?
Pin and hash-verify dependencies, use a private package proxy, restrict server internet access, turn on MFA for every developer and registry account, and keep an inventory of what runs where.
References and further reading
- T1195.002: Supply Chain Compromise: Compromise Software Supply Chain
- T1195.001: Supply Chain Compromise: Compromise Software Dependencies and Development Tools
- CWE-506: Embedded Malicious Code
- NIST Secure Software Development Framework (SSDF)
- SLSA: Supply-chain Levels for Software Artifacts
- NVD: CVE-2024-3094 (xz Utils backdoor)
- MITRE ATT&CK Enterprise matrix
- MITRE CWE list
- NIST Computer Security Resource Center glossary
Found a technical error in this entry? Tell us and we will fix it.