module

Docker Privileged Container Escape

Disclosed
Jul 17, 2019
Created
Aug 5, 2020

Description

This module escapes from a privileged Docker container and obtains root on the host machine by abusing the Linux cgroup notification on release
feature. This exploit should work against any container started with the following flags: `--cap-add=SYS_ADMIN`, `--privileged`.

Author

stealthcopter

Platform

Linux

Architectures

x86, x64, armle, riscv64le, riscv32le, mipsle, mipsbe

Module Options

To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':


msf > use exploit/linux/local/docker_privileged_container_escape
msf exploit(docker_privileged_container_escape) > show targets
...targets...
msf exploit(docker_privileged_container_escape) > set TARGET < target-id >
msf exploit(docker_privileged_container_escape) > show options
...show and set options...
msf exploit(docker_privileged_container_escape) > exploit

Title
Rapid7 Labs

2026 Global Threat Landscape Report

The predictive window has collapsed. Exploitation follows disclosure in days. See how attackers are accelerating and how to stay ahead.