Skip to main content
Mallory
HighPublic exploitVulnerability

CVE-2019-5736: Container escape through host runc binary overwrite

Published Feb 11, 2019 · Updated 1 month ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 daysNo mention activity in the last 30 days.
CVSS8.6High · v3.1
EPSS98.5%100th percentile
CISA KEVNoNot listed
In the wildReported3 exploitation records in Mallory
Vendors
OpensuseRed HatD2iqDockerFedora ProjectNetAppGoogleLinux Containers
IdentifiersCVE-2019-5736CWE-403

CVE-2019-5736 is a container escape vulnerability affecting runc through 1.0-rc6, including its use in Docker before 18.09.2. Improper handling of executable file descriptors exposes the host runtime executable to container processes, allowing an attacker executing as root inside a container to overwrite the host runc binary. Exploitation can occur when an attacker-controlled image is started or when a process is executed in an existing container that the attacker has previously modified. Subsequent runtime execution can execute attacker-controlled code as root on the host. Docker containers using default settings are affected; the equivalent LXC flaw affects privileged containers.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Analyst brief

Impact, mitigation & remediation

What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation breaks container isolation, permits modification of the host runc executable, and enables arbitrary command execution with host root privileges. This can result in full host compromise. Overwriting the runtime can also break container runtime functionality.

Mitigation

If you can’t patch tonight, do this now.

Avoid untrusted container images and restrict access to container management interfaces, including Docker APIs. Run containers as non-root where possible. User namespace remapping mitigates this attack by mapping container root to an unprivileged host identity that cannot write the host runc executable; unprivileged LXC containers use this isolation by default. These controls do not replace runtime updates. Cisco identifies no product-specific workarounds in its advisory.

Remediation

Patch, then assume compromise.

Upgrade runc and LXC to vendor-patched releases, and upgrade affected Docker installations to 18.09.2 or later. The runtime fix re-executes from a sealed anonymous in-memory executable copy rather than exposing the writable host binary. Apply relevant product-specific updates. For AWS, replace affected instances or nodes with patched AMIs; use Fargate Platform Version 1.3 or later and redeploy tasks. Update AWS IoT Greengrass to 1.7.1, or the documented 1.6.1 update with Linux kernel 3.17 or greater. Restart applicable SageMaker jobs or notebook instances to apply updates. Documented Cisco fixes include Cisco Container Platform 3.1.0 and Cisco Defense Orchestrator On-prem 19.8; other products require their vendor-specific fixed releases.

Public exploits

Exploits

9 exploits validated by Mallory's analysis. Hidden: 1 rejected by Mallory's analysis as not a working exploit; 2 not yet analyzed, such as Exploit-DB entries.

View more in app →
docker_runc_escape.rbThis repository contains a single Metasploit module: 'Docker Container Escape Via runC Overwrite' (modules/exploits/linux/local/docker_runc_escape.rb). The module exploits CVE-2019-5736, a critical vulnerability in Docker's runc container runtime, allowing an attacker with code execution inside a container to overwrite the runc binary on the host. When an administrator or automated process uses 'docker exec' to access the container, the malicious runc binary is executed, granting the attacker root access on the host. The module supports multiple payloads, including reverse shells and Meterpreter sessions, and is weaponized for operational use within the Metasploit framework. The exploit manipulates file paths such as /proc/${pid}/exe and /usr/bin/docker-runc to achieve its effect. The code is written in Ruby and is structured as a standard Metasploit local exploit module, with cleanup routines to restore the original runc binary and container shell after exploitation.Disclosed Jan 1, 2019 · Framework: metasploit · ruby · localWeaponizedCVE-2019-5736This repository contains a working exploit for CVE-2019-5736, a critical container escape vulnerability affecting Docker's runc and LXC on Linux. The exploit allows an attacker with code execution inside a container to overwrite the host's runc binary (or LXC equivalent), leading to root-level code execution on the host. The repository is organized into two main exploit implementations: 1. The 'CVE-2019-5736' directory contains a PoC that uses a malicious shared library and shell script to overwrite the runc binary when a container is started or attached. Key files include 'bad_libseccomp.c' (malicious shared library), 'bad_init.sh' (script to overwrite the binary), and 'make.sh' (build and setup script). 2. The root directory contains a more direct exploit: 'exploit.c' (main exploit logic), 'payload.c' (reverse shell payload), and 'pwn.sh' (automation script to trigger the exploit repeatedly). The payload is a reverse shell connecting to 127.0.0.1:4455 by default, but this can be changed in 'payload.c'. The exploit works by overwriting the host's runc binary (typically /usr/bin/docker-runc) with a malicious script or binary, so that subsequent container operations by the host will execute attacker-controlled code as root. The exploit is operational and includes a working payload, but is not weaponized for mass exploitation. The repository also includes documentation and references to the original vulnerability research.jas502n · Disclosed Feb 14, 2019 · c · bash · container escapeOperationalRunC-CVE-2019-5736This repository provides two proof-of-concept exploits for CVE-2019-5736, a critical vulnerability in runc, the container runtime used by Docker and other container systems. The repository is organized into two main PoCs: 1. exec_POC: Demonstrates the ability to overwrite the runc binary on the host with a benign payload (a program that prints a message). It uses a combination of shell scripts and C code to locate the runc process and replace the binary via /proc filesystem tricks. 2. malicious_image_POC: Demonstrates a more weaponized scenario where the runc binary is replaced with a bash script that opens a reverse shell to 0.0.0.0:2345, allowing remote code execution on the host. This PoC involves modifying libseccomp, compiling a custom overwrite tool, and using a crafted entrypoint to trigger the exploit. Key files include C source code for the overwrite logic, bash scripts for orchestration, Dockerfiles for building the PoC images, and payloads for the runc replacement. The exploit targets Linux systems running vulnerable versions of runc and requires the ability to run a container with a malicious image or code. The main attack vector is through container escape, leading to host compromise by overwriting the runc binary with attacker-controlled code.twistlock · Disclosed Feb 20, 2019 · c · bash · containerOperationalCVE-2019-5736-POCThis repository is a proof-of-concept exploit for CVE-2019-5736, a critical container escape vulnerability in Docker's runC. The exploit consists of several components: - A Dockerfile that builds a malicious container image, modifies libseccomp, compiles a C binary (overwrite_runc), and adds a malicious bash script (new_runc). - 'overwrite_runc.c' is a C program that, when executed, overwrites the runC binary on the host with the attacker's payload ('new_runc'). - 'run_at_link.c' is appended to libseccomp and is used to trigger the overwrite process by executing 'overwrite_runc' with a file descriptor to the runC binary. - 'new_runc' is a bash script that, once runC is replaced and executed on the host, installs a desktop environment and VNC server, sets up a default password, and configures the VNC server as a persistent systemd service, granting the attacker remote desktop access to the host. The exploit demonstrates a full container escape, allowing arbitrary code execution on the host and persistent access via VNC. The main attack vector is a container escape via a vulnerable runC binary. The repository is well-structured for operational exploitation and is not just a detection script or a simple proof of concept.RyanNgWH · Disclosed Jun 30, 2019 · c · bash · container escapeOperationalCVE-2019-5736This repository contains a Go implementation of an exploit for CVE-2019-5736, a critical container escape vulnerability in runc, the default container runtime for Docker and other container systems. The exploit works by overwriting the /bin/sh binary inside a container to point to /proc/self/exe, then locating the runc process on the host and overwriting its binary via the /proc filesystem. The default payload is a bash reverse shell that connects to the attacker's machine (10.10.14.12) on port 1234. The README provides detailed instructions for setting up the exploit, including modifying the payload, compiling the Go code, hosting the binary for download, and orchestrating the attack using multiple terminals. The exploit requires the attacker to have code execution inside a container and is effective against vulnerable runc versions on Linux. The main exploit logic is in main.go, which is the only code file. The repository is operational and provides a working exploit with a customizable payload.h3x0v3rl0rd · Disclosed Jul 8, 2021 · go · markdown · container escapeOperationalCVE-2026-31431-Container-EscapeRepository is a small Linux-focused exploit PoC with two functional files: main.go and runC.sh. main.go is a standalone Go exploit that embeds a compressed binary payload and writes it into a target executable using Linux AF_ALG sockets, ancillary control messages, and splice-based file descriptor operations. The overwrite occurs in 4-byte chunks, suggesting it is implementing a kernel/file-descriptor abuse primitive rather than a normal file write. The code defaults to targeting /usr/bin/su and can optionally execute su after the overwrite. Error handling explicitly treats aborted AF_ALG requests as a sign of a patched or mitigated kernel. runC.sh provides the container-escape orchestration. It overwrites /bin/sh with a shebang pointing to /proc/self/exe, then waits in a loop for a process matching /proc/self/exe to appear, identifying a runC process ID. Once found, it invokes /exploit against /proc/<pid>/exe, attempting to overwrite the host-side runC binary while it is executing. This is conceptually similar to the classic runC overwrite/escape technique referenced in the script comments (CVE-2019-5736), but the repository labels the exploit as CVE-2026-31431 and the Go code appears to rely on a vulnerable Linux kernel AF_ALG behavior to perform the overwrite primitive. Overall purpose: provide an operational container-escape exploit chain for Linux environments. The Go component supplies the binary-overwrite primitive and embedded payload; the shell script adapts it to a runC container breakout scenario by locating the runtime process and targeting /proc/<pid>/exe. No network communication is present; the exploit is entirely local/container-based and interacts with Linux file paths, process paths under /proc, and kernel crypto socket interfaces.qi4L · Disclosed May 2, 2026 · go · bash · local · containerOperationalcve-2019-5736-pocThis repository is a proof-of-concept exploit for CVE-2019-5736, a critical container escape vulnerability in Docker's runc. The exploit is implemented in two C files (stage1.c and stage2.c) and orchestrated via a Dockerfile. The Dockerfile builds a container that, when run, appends a string to the host's runc binary by exploiting the way runc handles /proc/self/exe. The exploit works by injecting code into the runc binary from within a container, demonstrating the ability to overwrite files on the host. The payload is currently a simple string, but the README notes that arbitrary payloads can be used by modifying stage2.c. The repository is structured for easy demonstration and testing of the vulnerability, and does not include weaponized payloads by default.q3k · Disclosed Feb 12, 2019 · c · dockerfile · container escapePoCCVE-2019-5736-PoCThis repository is a Proof-of-Concept (PoC) exploit for CVE-2019-5736, a critical container escape vulnerability affecting Docker's runc runtime on Linux. The exploit is implemented in Go (main.go) and is designed to be executed from within a Docker container where the attacker has root privileges. The exploit works by overwriting the /bin/sh binary in the container to point to /proc/self/exe, then locating the runc process on the host, obtaining a file handle to its binary, and overwriting it with a malicious payload. This payload is a shell script that executes arbitrary commands as root on the host when triggered (typically when a user attaches to the container with 'docker exec'). The README.md provides detailed background, usage instructions, and warnings about the destructive nature of the exploit (overwriting runc disables Docker on the host until runc is restored). The exploit targets Docker versions 18.09.1-ce and 18.03.1-ce on Linux distributions such as Ubuntu 18.04, Debian 9, and Arch Linux. The main attack vector is local privilege escalation from within a container to root on the host. The repository contains no network endpoints, but several critical file paths are used as part of the exploit chain.Frichetten · Disclosed Feb 13, 2019 · go · localPoCcve_2019-5736-PoCThis repository is a C-based proof-of-concept exploit for CVE-2019-5736, a critical container escape vulnerability in Docker's runc runtime. The exploit is designed to be run from within a malicious Docker container. It works by overwriting the host's runc binary via a race condition, allowing arbitrary command execution as root on the host. The default payload copies the host's /etc/shadow file to /tmp/pwned and makes it world-readable, but the payload can be customized via command-line arguments. The repository includes scripts for setting up a vulnerable Docker environment, building the exploit, and automating the exploitation process. The main exploit logic is implemented in C (src/main.c and src/exploit.c), with supporting headers and build scripts. The exploit targets Linux systems running Docker 18.09.1 and runc, specifically on Ubuntu 18.04.1 as tested. Key fingerprintable endpoints include /bin/sh (overwritten), /proc/self/exe (used for redirection), /etc/shadow (exfiltrated), and /usr/bin/runc (the main target). The exploit is a functional PoC and not weaponized, but demonstrates full host compromise from a container context.Perimora · Disclosed Jun 25, 2025 · c · bash · container escapePoC
Exposure surface

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
Apache Software FoundationMesosapplication
CanonicalUbuntu Linuxoperating_system
D2iqDc/Osoperating_system
D2iqKubernetes Engineapplication
DockerDockerapplication
Fedora ProjectFedoraoperating_system
GoogleKubernetes Engineapplication
Hewlett Packard EnterpriseOnesphereapplication
Linux ContainersLxcapplication
Linux FoundationRuncapplication
Micro FocusService Management Automationapplication
NetAppHci Management Nodeapplication
NetAppSolidfireapplication
OpensuseBackports Sleapplication
OpensuseOpensuse Leapoperating_system
Red HatContainer Development Kitapplication
Red HatEnterprise Linux Serveroperating_system
Red HatOpenshiftapplication
Red HatRed Hat Enterprise Linuxoperating_system
FAQ

Frequently asked questions

Is CVE-2019-5736 exploited in the wild?
Yes. As of Oct 16, 2026, Mallory has reports of exploitation in the wild.
Is there a public exploit for CVE-2019-5736?
Yes. Mallory tracks 9 public exploits or proofs of concept for CVE-2019-5736, the earliest disclosed Jan 1, 2019.
Is there a patch for CVE-2019-5736?
Upgrade runc and LXC to vendor-patched releases, and upgrade affected Docker installations to 18.09.2 or later. The runtime fix re-executes from a sealed anonymous in-memory executable copy rather than exposing the writable host binary.
What products are affected by CVE-2019-5736?
Docker, Linux Containers Lxc, Linux Foundation Runc, Opensuse Backports Sle, Red Hat Container Development Kit, and 14 more.
How severe is CVE-2019-5736?
CVE-2019-5736 has a CVSS v3.1 score of 8.6 (High) and an EPSS score of 98.5% (100th percentile) as of Oct 16, 2026.
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, and which detections to deploy tonight.
Exposure mappingQuery your assets running an affected version, and investigate the blast radius.
Threat actor evidence1Every report linking this CVE to a named adversary.
Associated malware6Malware families linked to this CVE, with evidence and IOCs.
Detection signaturesYARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activity11Community discussion across Reddit, Mastodon, and other social sources.