What are the Shellshock and Dirty COW vulnerabilities, and why do they matter for container images?
Shellshock is a Bash flaw that runs attacker code smuggled through environment variables; Dirty COW is a Linux-kernel race condition giving local write access to read-only memory. A pulled image can carry a vulnerable component.
An image bundles an OS userland and libraries, and those can be out of date and vulnerable. Two famous examples:
- Shellshock (CVE-2014-6271). Bash mis-handled specially crafted environment variables: text after a function definition in a variable was executed. Any path that let an attacker set an environment variable and then invoke Bash — classically CGI web scripts, where HTTP headers become env vars — allowed arbitrary command execution.
- Dirty COW (CVE-2016-5195). A race condition in the Linux kernel's copy-on-write handling let a local user write to files they should only be able to read, a reliable local privilege escalation.
Why it matters for containers: because containers share the host kernel, a kernel bug like Dirty COW exploited from inside a container can affect the host. And a userland bug like Shellshock in an image's packages exposes the containerised app. The defence is routine: keep base images current, scan images for known CVEs, and rebuild rather than run stale images.
Go deeper:
Wikipedia: Shellshock — the Bash env-var flaw and its CGI exploit path.
Wikipedia: Dirty COW — the kernel copy-on-write race used for local root.
CISA: Bash Shellshock alert (CVE-2014-6271) — the official advisory at disclosure.