20–30 min Updated

Toxic Dependencies

By Malcolm McDonald Founder, Editor-in-ChiefAuthor of Grokking Web Application Security

Third-party libraries could be introducing vulnerabilities or malicious code into your system.

Prevalence
Occasional
Exploitability
Moderate
Impact
Devastating

What are toxic dependencies?

Toxic dependencies are a software supply chain vulnerability in which third-party libraries introduce security flaws or malicious code into your application. A dependency may contain a known vulnerability that was never patched, or may have been deliberately compromised by an attacker. Because most applications are built largely from open-source packages, one bad dependency can affect thousands of systems.

What you'll learn

  • How vulnerable and compromised libraries end up in your application
  • What Log4Shell, SolarWinds and Heartbleed show about supply chain risk
  • How pinned versions, dependency scanning and prompt patching reduce exposure

Where this lesson counts

OWASP Top 10

  • Toxic Dependencies lab

    Revisit the incidents that made dependencies a security problem: Log4Shell, Rails mass assignment and the GitHub hack, XcodeGhost, SolarWinds and Heartbleed. Then play the attacker with a simulated Heartbleed memory dump, find the login credentials inside and use them.

  • How to prevent Toxic Dependencies

    The prevention guide covers eight approaches, including:

    • Automate Your Build and Deployment Processes
    • Deploy Known-Good Versions of Software
    • Be Careful of Private Dependencies
  • Toxic Dependencies quiz

    Two questions. Passing marks the lesson complete.

Glossary terms

Further reading