Application security, DevSecOps, Third-party code, Supply chain

When yesterday’s code becomes today’s threat

A 3D rendering shows a chain of binary code links breaking apart, symbolizing a data breach or cybersecurity vulnerability.

COMMENTARY: A striking new supply chain attack is sending shockwaves through the developer community: a worm-style campaign dubbed “Shai-Hulud” has compromised at least 187 npm packages, including the tinycolor package that has 2 million hits weekly, and spreading to other maintainers' packages. The malicious payload modifies package manifests, injects malicious files, repackages, and republishes — thereby infecting downstream projects. 

[SC Media Perspectives columns are written by a trusted community of SC Media cybersecurity subject matter experts. Read more Perspectives here.]

This incident underscores a harsh reality: even code released weeks, months, or even years ago can become dangerous once a dependency in its chain has been compromised. 

What’s the risk, exactly?  

  • Delayed detection means delayed damage. An attacker doesn’t need to compromise your code directly if one of your dependencies is hijacked. By the time many see the breach, dozens or hundreds of projects may already be affected. 
  • Signature and identity matter. If downstream users or developers don’t verify who published the package — or trust that the content is unchanged — there's no reliable barrier against this kind of attack. 
  • Versions are distinct and difficult to trace. Not all versions of an npm package may be compromised. However, it can be hard to trace which version is in use. And proving that the version you are using is the version you think it is adds another layer of difficulty.
  • Scope runs deep. A single compromised npm package can ripple through everything that depends on it — including codebases many levels deep. Even more so when CI workflows and developer credentials are also hijacked as part of the exploit. 

What publishers and developers should be doing now  

1. Sign your code. All packages/releases should use cryptographic signing. This allows users to verify the origin and integrity of what they are installing. 

2. Verify signatures before use. When pulling in dependencies, CI/CD pipelines, and even local dev setups, include a step to check that the signature matches a trusted publisher and that the code wasn’t tampered with. 

3. SBOMs are your map of exposure. If you have a Software Bill of Materials for your project(s), you can query it for compromised packages. Find which versions/packages have been modified — even retroactively — so you can patch, remove, or isolate them. 

4. Continuous monitoring of risk posture. It's not enough to secure when you ship. You need alerts when any dependency or component’s risk changes: new vulnerabilities, suspicious behavior, misuse of credentials, or signs that a trusted package may have been modified after release. 

Looking ahead: What’s needed  

Reading through the Shai-Hulud attack, one thing is clear: we need better visibility and faster notification of risk changes. Imagine a system that: 
  • Tracks your dependencies (via your SBOM) 
  • Monitors known malicious package alerts, anomalous republish behavior, compromise in upstream maintainers 
  • Notifies you immediately when something in your dependency tree becomes suspect, even if the package was published long ago 

Such a solution would let developers respond before an exploit becomes widespread, not just after people start seeing breaches. 

Why this time might be different  

Publishers who build in strong identity (signing, verified maintainers) + consumers who build verification into their pipelines are able to dramatically reduce risk. This kind of “after-the-fact” damage only proliferates when: 
  • Code is trusted implicitly without audit
  • Old dependencies are left unverified in production or CI environments 
  • Developers don’t have visibility into which dependencies have been updated, modified, or compromised 

Final thoughts  

The npm supply chain attack is another reminder that software doesn’t exist in isolation. Every package, dependency, and build step introduces new avenues for attackers — and that risk can change long after code is first released. Signing code and verifying signatures, combined with SBOMs that give teams visibility into their dependencies, are essential practices today.

But we also need to recognize that the supply chain is dynamic. Threats emerge weeks or months later, and organizations must be prepared to reassess their risk posture continuously. By combining strong identity (through signing) with visibility (through SBOMs), developers and security teams can better detect when something they once trusted may no longer be safe — and act before attackers gain the upper hand.
Brian Trzupek

Brian Trzupek is SVP of Product at DigiCert.

Get daily email updates

SC Media's daily must-read of the most current and pressing daily news

By clicking the Subscribe button below, you agree to SC Media Terms of Use and Privacy Policy.

You can skip this ad in 5 seconds