TL;DR
This paper introduces DIVA, a novel framework for automatically discovering, downloading, and analyzing security vulnerabilities in Docker Hub images. Their study of over 350,000 images reveals a significant prevalence of vulnerabilities, with many images remaining unpatched for extended periods and vulnerabilities propagating through image inheritance.
What Problem Does This Paper Address?
Docker containers have exploded in popularity for their efficiency in provisioning applications. This has led to the creation of Docker Hub, a massive registry for sharing container images. However, the sheer scale and diverse origins of these images raise serious security concerns. The paper aims to answer: "What is the state of security vulnerabilities on Docker Hub?" Specifically, they investigate the types and severity of vulnerabilities, how often images are updated, and whether vulnerabilities spread from parent to child images. This is crucial because compromised container images can lead to widespread security breaches.
Methods
The core of this work is the DIVA (Docker Image Vulnerability Analysis) framework. DIVA tackles several challenges:
- Image Discovery: Since there's no public index of community Docker images, DIVA uses a keyword-based search strategy, generating millions of search strings to discover repository names.
- Scalable Analysis: Docker Hub is too large to download entirely. DIVA employs a stream-based, parallel analysis approach where images are downloaded, analyzed, and then deleted to free up space. This allows for processing hundreds of thousands of images concurrently across multiple machines.
- Vulnerability Detection: The framework leverages Clair, an open-source vulnerability scanner, to identify known vulnerabilities (CVEs) within the software packages installed in each image layer. Clair statically analyzes package versions and OS metadata against vulnerability databases.
- Inter-Image Dependency Analysis: To understand vulnerability propagation, DIVA builds an image dependency graph. This graph represents layers and their relationships, allowing the researchers to trace how vulnerabilities are inherited from parent images to child images. They analyze this by comparing the CVEs present in parent and child images, categorizing them as new, unpatched, or patched.
Datasets
The primary dataset used in this study consists of over 356,218 Docker images (from 86,066 repositories), including both official and community images, collected from Docker Hub. This is a newly compiled dataset for the purpose of this research, as no prior comprehensive enumeration of community images existed.
Key Insights and Ideas
- Ubiquitous Vulnerabilities: The sheer volume of vulnerabilities found across both official and community images is striking. It suggests that container security is not a niche problem but a systemic one.
- The "Unpatched" Problem: The significant number of images that haven't been updated in hundreds of days is a major red flag. This implies a large attack surface due to outdated software.
- Inheritance is Key: Vulnerabilities aren't isolated; they actively spread through the image layering mechanism. This means a single vulnerable base image can infect countless downstream images.
- Official Images Aren't Immune: While official images are generally better maintained, they still contain a substantial number of vulnerabilities, and crucially, often have at least one "high" severity vulnerability.
- The "Influential Base Image" Hypothesis: The research points to a small set of highly "influential" base images as the likely root cause of widespread vulnerabilities, suggesting that securing these foundational images could have a disproportionately large impact.
Key Results
- Average Vulnerabilities: Both official and community images contain over 180 vulnerabilities on average (considering all versions). Even the latest official images average over 70 vulnerabilities.
- High Severity Vulnerabilities: Over 80% of both official and community images have at least one high-severity vulnerability.
- Image Age: Approximately 50% of images were not updated in 200 days, and 30% in 400 days. Latest official images are much more frequently updated (86% updated within 14 days).
- Vulnerability Propagation: Child images inherit an average of 80 vulnerabilities from their parents and introduce about 20 new vulnerabilities on average. Vulnerability propagation is slightly better when child images are derived from official images.
- Top Vulnerable Packages: Packages like
glibc,util-linux, andshadoware consistently found to be the most frequent sources of vulnerabilities across both official and community images.
Limitations and Future Work
The authors acknowledge several limitations:
- Static Analysis: Clair performs static analysis, meaning it identifies known vulnerabilities in installed packages but doesn't detect vulnerabilities arising from dynamic behavior or runtime configurations.
- Package Usage: Clair identifies vulnerable packages but doesn't determine if those packages are actually used by container instances.
- No Dynamic Scanning: The current framework doesn't dynamically scan packages being installed at runtime.
Future work directions include:
- Dynamic Scanning: Implementing dynamic analysis to detect vulnerabilities introduced during runtime.
- Automated Patching: Developing methods to automatically patch running containers or update images, which is challenging due to resource overhead and potential service disruptions.
- Improving Image Publishers' Practices: Encouraging image publishers and users to adopt vulnerability assessment tools during the image lifecycle.
- Focusing on Influential Base Images: Investigating methods for automatically pushing updates based on the dependency graph, particularly for highly influential base images.
Summary updated