Course contentsShow
← Security
Lesson 1967 of 3,05239. Cloud Security - Compute and ServerlessFree lesson

Using Components with Known Vulnerabilities

Managing dependency risks, outdated runtimes, vulnerable libraries, and supply chain security in serverless functions.

Using Components with Known Vulnerabilities

What you'll learn: How outdated dependencies and vulnerable libraries in serverless functions create exploitable attack vectors and compromise your cloud security posture.


Serverless functions rely heavily on external libraries and runtime dependencies to perform their tasks. Every npm package, Python module, or Lambda layer you include brings along its own security history—and sometimes, its own vulnerabilities. When you use components with known CVEs (Common Vulnerabilities and Exposures), you're essentially leaving doors unlocked that attackers already know how to open.

Why Serverless Makes This Worse

Unlike traditional servers where you might have a dedicated patching schedule, serverless functions can sit dormant for months with their original dependencies frozen in time. You deploy once, it works, and you move on—until someone exploits a two-year-old vulnerability in a JSON parsing library you forgot was even there.

The supply chain risk is real: Even trusted packages can be compromised or may depend on other vulnerable packages several layers deep. A single outdated transitive dependency can expose your entire function.

The Threat Model

Attackers scan public vulnerability databases looking for common patterns. They know many teams use popular frameworks with known flaws. If your function uses an outdated version of lodash, request, or any runtime library with published exploits, automated scanners will find it. From there, attackers can achieve remote code execution, data exfiltration, or privilege escalation—all within your function's execution context and IAM role.

Managing the Risk

  • Scan dependencies before deployment using tools that check against CVE databases
  • Pin runtime versions and update them regularly (don't use deprecated runtimes)
  • Audit transitive dependencies—not just what you install directly
  • Monitor security advisories for your language ecosystem
  • Automate dependency updates with testing to catch breaking changes

Key Takeaway: Serverless functions inherit every vulnerability in their dependencies; regular scanning, updating, and supply chain monitoring are essential to prevent exploitation of known CVEs that attackers actively target.