Security Experts:

Connect with us

Hi, what are you looking for?

SecurityWeekSecurityWeek

Cloud Security

Container Escape Flaw Hits AWS, Google Cloud, Linux Distros

A vulnerability recently addressed in runc could allow malicious containers to gain root-level code execution on the host.

A vulnerability recently addressed in runc could allow malicious containers to gain root-level code execution on the host.

Introduced in 2015, runc is a lightweight, portable container runtime that includes all of the code used by Docker to interact with system features related to containers. The runtime is used in most containers out there, including cri-o, containerd, Kubernetes, Podman, and others.

Tracked as CVE-2019-5736 and featuring a CVSSv3 score of 7.2, the vulnerability can be exploited with minimal user interaction, senior software engineer at SUSE Linux and runc maintainer Aleksa Sarai says.

Discovered by Adam Iwaniuk and Borys Popławski, the vulnerability could allow a malicious container to overwrite the host runc binary and execute code on the host.

The bug can be triggered when creating a new container using an attacker-controlled image, or when attaching to a running container (using docker exec) that the attacker previously had write access to.

“Exploiting this vulnerability means that malicious code could potentially break containment, impacting not just a single container, but the entire container host, ultimately compromising the hundreds-to-thousands of other containers running on it,” Scott McCarty, Red Hat principal product manager for containers, says.

The use of SELinux in targeted enforcing mode prevents this vulnerability from being exploited. However, the default AppArmor policy and the default SELinux policy on Fedora (only the moby-engine package) fail to prevent the bug, Sarai says.

Only privileged containers (root privilege on the host is required) can exploit the flaw (unprivileged containers with a non-identity ID mapping don’t have permission to write to the host binary).

The vulnerability impacts runc releases through 1.0-rc6, as used in Docker before 18.09.2 and other products. The vulnerability occurs because of file-descriptor mishandling, related to /proc/self/exe.

Red Hat, Debian and Ubuntu are impacted by the flaw. Amazon and Google too published advisories, confirming the vulnerability in their products. LXC is also affected by the flaw.

A GitHub repository was created to provide a backport of patches for older versions of runc that were packaged with Docker.

Exploit code for the vulnerability is expected to be published within a week. A Shodan search shows that there are nearly 4,000 exposed Docker daemons on the internet.

Related: Misconfiguration a Top Security Concern for Containers

Related: Code Execution in Alpine Linux Impacts Containers

Written By

Ionut Arghire is an international correspondent for SecurityWeek.

Click to comment

Daily Briefing Newsletter

Subscribe to the SecurityWeek Email Briefing to stay informed on the latest threats, trends, and technology, along with insightful columns from industry experts.

Join this webinar to learn best practices that organizations can use to improve both their resilience to new threats and their response times to incidents.

Register

Join this live webinar as we explore the potential security threats that can arise when third parties are granted access to a sensitive data or systems.

Register

Expert Insights

Related Content

Application Security

Cycode, a startup that provides solutions for protecting software source code, emerged from stealth mode on Tuesday with $4.6 million in seed funding.

Vulnerabilities

Less than a week after announcing that it would suspended service indefinitely due to a conflict with an (at the time) unnamed security researcher...

Cybercrime

The changing nature of what we still generally call ransomware will continue through 2023, driven by three primary conditions.

Cybercrime

No one combatting cybercrime knows everything, but everyone in the battle has some intelligence to contribute to the larger knowledge base.

Risk Management

The supply chain threat is directly linked to attack surface management, but the supply chain must be known and understood before it can be...

Cybercrime

A recently disclosed vBulletin vulnerability, which had a zero-day status for roughly two days last week, was exploited in a hacker attack targeting the...

Cloud Security

Microsoft and Proofpoint are warning organizations that use cloud services about a recent consent phishing attack that abused Microsoft’s ‘verified publisher’ status.

Vulnerabilities

Apple has released updates for macOS, iOS and Safari and they all include a WebKit patch for a zero-day vulnerability tracked as CVE-2023-23529.