Skip to content
Tutorials Center
My learning

Topics

Lesson 19 of 38 ยท Vulnerable Components and Auth Failures

Vulnerable and Outdated Components

Understand OWASP A06: why old libraries, frameworks and runtimes put your app at risk, how known vulnerabilities spread, and how to find them safely.

Almost no modern application is written from scratch. A typical web project pulls in hundreds of libraries, each with its own dependencies, plus a framework, a language runtime, a web server and a base container image. When one of these pieces has a known security flaw and you have not updated it, your app inherits that flaw. OWASP calls this Vulnerable and Outdated Components (category A06 in the 2021 list).

The key word is known. Unlike a bug in your own code, these flaws are public. Someone has published a description, often with a CVE identifier, and automated scanners on the internet look for exactly those versions. This lesson explains how the problem arises and how to reason about it. The next lesson, Dependency Scanning and SBOMs, shows how to detect it automatically.

This chapter teaches defense. Every example uses made-up package names and version numbers. Only test systems you own or have written permission to test.

Why old components are dangerous

A vulnerability becomes dangerous in three steps:

  1. A researcher or vendor finds a flaw in a component and reports it.
  2. A fixed version is released and an advisory is published, often with a CVE (Common Vulnerabilities and Exposures) number and a CVSS severity score from 0 to 10.
  3. Attackers read the advisory too. They now know exactly which versions are weak and what the flaw allows. Scanning the internet for those versions is cheap.

The gap between step 2 and the moment you deploy the fix is your exposure window. A famous pattern is a critical library flaw published on a Friday and exploited at scale by the weekend, hitting everyone who had not patched.

How exposure builds up

Flaw found Reported to the maintainer.
Fix released A new version ships.
Advisory public CVE and severity appear.
Attackers scan Old versions are targets.

You are exposed until you upgrade.

1 / 2

Typical causes

OWASP lists several symptoms. You may be vulnerable if:

  • You do not know the versions of every component you use, including transitive ones (the libraries your libraries depend on).
  • The software is unsupported or end-of-life, so it will never get a fix.
  • You do not scan for vulnerabilities regularly or subscribe to advisories.
  • You do not patch the platform (OS, web server, runtime) in a timely, risk-based way.
  • Developers never test whether an upgraded library still works, so upgrades are avoided out of fear.
  • Component configuration is insecure (see security misconfiguration in the track).

The last-but-one point is the hidden driver: when nobody trusts the test suite, nobody upgrades, and the system rots.

Matching versions against an advisory

At its core, a scanner does something simple: it compares the version you use with the affected range in an advisory. The stand-in below uses a fictional advisory list. It does not touch the network and the packages are invented.

Python Check versions against fictional advisories

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Notice the comparison uses version tuples, not strings. As strings, "2.10.0" sorts before "2.4.1", which would make a scanner wrong. Real tools use the ecosystem's own version rules (semantic versioning, Maven ranges, distro epochs).

Direct versus transitive dependencies

Your project file lists direct dependencies. A lock file records the full resolved tree. The flawed package is often three levels down, which is why you must scan the lock file, not just the manifest.

Python Walk a dependency tree

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The output shows a path from your app to the weak package. You never chose fastparse; template-lib did. Fixing it means upgrading template-lib (or web-kit), or overriding the version if the ecosystem allows it.

A sensible patching approach

  • Inventory what you run (see the SBOM lesson).
  • Remove what you do not use. Unused dependencies still carry risk.
  • Prefer maintained components: recent releases, active maintainers, a security policy.
  • Automate update proposals (bots that open pull requests) and run your test suite on each.
  • Prioritize by exposure, not just score: is the vulnerable code reachable in your app, and is it internet-facing?
  • Plan for end-of-life: track the support dates of your runtime and framework, and migrate before support ends.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Why is a CVE in a library you use dangerous even though you did not write the code?

    Advisories describe affected versions, which lets attackers scan for them. Your exposure lasts until you upgrade.
  2. 2. What is a transitive dependency?

    Transitive dependencies are pulled in indirectly. They are often where a vulnerable package hides, so scan the full lock file.
  3. 3. Why should versions be compared as number tuples and not as plain strings?

    Lexical comparison breaks on multi-digit parts. Real tools use ecosystem-specific version parsing.
  4. 4. Which habit most reduces the risk of A06 over time?

    Inventory, scanning and tested upgrades keep the exposure window short. Hiding versions or vendoring without tracking does not fix anything.

Summary

  • A06 means using components with known flaws or that no longer receive fixes.
  • Advisories are public, so attackers target old versions quickly.
  • Flawed packages often hide in transitive dependencies; scan lock files.
  • Compare versions with proper parsing, not string comparison.
  • Inventory, remove unused code, automate updates and keep a trusted test suite.

Next: Dependency Scanning and SBOMs