Container Image Vulnerability Landscape
What you'll learn: You'll understand the three major categories of security vulnerabilities that can hide inside your container images.
When you pull or build a container image, you're not just getting your application code—you're inheriting an entire software ecosystem. Unfortunately, that ecosystem can harbor security vulnerabilities that attackers can exploit once your container is running.
The Three Main Risk Categories
OS Package Vulnerabilities
Your base image contains an operating system (even if minimal) with installed packages like curl, openssl, or bash. These packages regularly have discovered security flaws (CVEs). Think of it like inheriting an old house—you might not see the cracked pipes or faulty wiring at first, but they're there. A vulnerability in glibc from six months ago could compromise your container today if the base image wasn't updated.
Language Dependencies
Application dependencies—npm packages, Python libraries, Go modules, Java JARs—are another major attack surface. When your package.json includes dozens of transitive dependencies (dependencies of dependencies), any one of them might contain known exploits. Attackers actively scan for outdated versions of popular libraries.
Malware and Supply Chain Risks
Images can contain intentionally malicious code. This might come from a compromised base image, a malicious dependency, or even a build process that was tampered with. Because layers are immutable and content-addressed, malware hidden in a layer stays there until you rebuild with clean sources.
The danger compounds because these vulnerabilities persist across all containers launched from the affected image—one vulnerable image can compromise dozens of running workloads.
Key Takeaway: Container images inherit vulnerabilities from OS packages and language dependencies, and can contain malware—understanding these risk categories is essential before scanning and hardening your registry images.