Home
Cybersecurity & AI Security / Part 22 — Vulnerable Components and the Software Supply Chain

Vulnerable Components and the Software Supply Chain

CAP, ACID vs BASE, latency numbers, back-of-envelope estimation, single points of failure — the vocabulary every system designer thinks in.


Core Philosophy: Modern software is not written — it is assembled. Any application is a small amount of original code resting on a vast foundation of third-party libraries, frameworks, and tools, each written by someone else. Every one of those dependencies is code you didn’t write but you are responsible for. When one of them has a vulnerability, your application has that vulnerability — no matter how perfect your own code is.

Part 1: The Problem

Picture a typical web application. The developers wrote, perhaps, a few thousand lines of original code. But the application also includes a web framework, a templating engine, a database library, an authentication library, dozens of utility libraries — and each of those depends on others, which depend on others. The result is that the overwhelming majority of the code actually running is third-party.

This is normal, sensible, and unavoidable — nobody should rewrite a web framework from scratch. But it has a hard security consequence: you are responsible for the security of code you never wrote and may never have read. If a library three levels deep in your dependencies has a critical vulnerability, your application is critically vulnerable. This section is about that reality — the software supply chain — and how attackers and defenders deal with it.

Part 2: The Concept — Dependencies and Known Vulnerabilities

A dependency is any external piece of code your application relies on. Dependencies form a tree: your code depends on libraries (direct dependencies), which depend on other libraries (transitive dependencies), often many layers deep.

text
        YOUR CODE
            │
   ┌────────┼────────┐
   lib A   lib B   lib C          ← direct dependencies
   │   │     │       │
  libD libE libF   libG ...       ← transitive dependencies
   │
  libH ...                        ← deeper still

   You explicitly chose A, B, C.
   D through H came along for the ride —
   and you're running all of them.

Now the key fact about vulnerabilities here: when a security flaw is discovered in a piece of widely-used software, it gets publicly catalogued. It’s assigned a CVE (Common Vulnerabilities and Exposures) identifier — a unique public ID for that specific vulnerability — and published in databases anyone can search.

This public cataloguing is good — it lets defenders know what to patch. But it cuts both ways: it also hands attackers a precise, searchable list of known weaknesses, often complete with technical detail and sometimes ready-made exploit code. So when a library has a known CVE, an attacker can:

  1. Fingerprint your app (recall 2.1) to identify the library and its version.
  2. Look up known CVEs for that exact version.
  3. Use published exploit details against you.

Using a component with a known vulnerability is therefore one of the easiest things for an attacker to exploit — the research is already done and public. This is its own OWASP Top 10 category for exactly that reason.

Part 3: The Software Supply Chain — A Broader Risk

“Vulnerable components” is the most common version of a bigger idea: software supply chain security. Your supply chain is everything and everyone involved in producing the code you run — the libraries, the tools that build it, the repositories it’s downloaded from, the maintainers who write it.

An attacker can target any link in that chain, not just exploit a known CVE. The main supply-chain attack patterns to be aware of:

This is also a place where the integrity half of the CIA triad (1.1) comes to the front: much of supply-chain defense is about verifying that the code you received is genuinely the code you intended — unaltered and from a trusted source. (You’ll see the integrity-verification side in Phase 4 and Phase 5B/5C.)

Part 4: Finding Vulnerable Components

The good news: detecting known vulnerable components is one of the most automatable tasks in security. The approach:

text
1. INVENTORY     Determine what components the app uses, and
                    their versions. You cannot assess what you
                    haven't inventoried. The result is sometimes
                    formalized as an SBOM (see below).
2. CHECK         Compare each component+version against public
                    vulnerability databases (CVE data).
3. AUTOMATE      Use dependency-scanning / SCA tools that do
                    steps 1–2 automatically and continuously.
4. ASSESS        For each finding: is the vulnerable component
                    actually used in an exploitable way? Severity
                    and real exposure matter, not just presence.
5. PRIORITIZE    Fix by risk (recall 1.1) — exploitable +
                    high-impact first.

Key tools and terms:

From the attacker’s side, the same information is the input: fingerprint the target (2.1), identify component versions, search the same public databases for known exploits.

Part 5: Why This Is Hard to Manage

If detection is so automatable, why do vulnerable components remain a top category? Because managing them is genuinely hard:

The realistic takeaway: dependency security is an ongoing process, not a task you complete — which is why it belongs to vulnerability management (Phase 4.8) and to automated pipelines (Phase 5B/5C).

Part 6: A Glance at the Fix

Managing component risk (built fully in Phase 4.8 and the Phase 5 tracks):

The unifying principle: you own the security of everything you ship, including the parts you didn’t write — so know what you’re running, keep it current, and keep checking.

📓 Key Terms

Term Plain meaning
DependencyAn external piece of code an application relies on.
Direct / transitive dependencyA library you chose / a library pulled in by another library.
CVECommon Vulnerabilities and Exposures — a public ID for a specific known vulnerability.
Vulnerability databaseA public catalogue of known vulnerabilities.
Software supply chainEverything and everyone involved in producing the code you run.
TyposquattingA malicious package named to mimic a popular one.
Dependency confusionTricking tooling into pulling a malicious public package over an internal one.
SCA (Software Composition Analysis)Tools that inventory dependencies and flag known-vulnerable ones.
SBOMSoftware Bill of Materials — a formal inventory of all components.

🧪 Hands-On Lab

Scanning your own projects is always fine. Treat any results responsibly.

Task 1 — Inventory a real project. Take any software project you have (or download an open-source one). Find its dependency manifest (the file listing its libraries). List the direct dependencies. Then appreciate that each has its own — the real tree is far larger.

Task 2 — Run a dependency scan. Use a dependency-scanning tool on that project — many package managers have a built-in audit command, and code-hosting platforms offer automated dependency alerts. See what known-vulnerable components it reports.

Task 3 — Trace one CVE. Pick one finding from Task 2. Look up its CVE in a public vulnerability database. Read: what the vulnerability is, how severe it is, what version fixes it. You’ve just done what both a defender and an attacker do with the same data.

Task 4 — Exploit a known-vulnerable component in the lab. Deliberately vulnerable practice apps often include outdated components with known CVEs. Identify one, find its public CVE, and (in your lab) understand or carry out the known exploit. Experience how “known vulnerability” means “research already done for the attacker.”

Task 5 — Fingerprint a target’s components. On your lab app, use the fingerprinting tools from 2.1 to identify component versions from the outside — as an attacker would, with no access to the source. See how much an attacker can learn just from the app’s responses.

Task 6 — Practice the response drill. Imagine a critical CVE is announced in a popular framework. Write the steps you’d take to answer “do we use it, where, and how fast can we fix it?” Notice every step depends on having an inventory and process already in place.

⚠️ Common Mistakes

✅ Recap & What’s Next

Next (2.11): You’ve now learned every major web vulnerability category individually. The final page of Phase 2 brings them together — a complete, methodical web application penetration test, run end to end, ending in a professional findings report.

⁂ Back to all modules