Description
Portainer is a web UI for managing Docker and Kubernetes environments. An authenticated Portainer administrator (or a non-admin user whose security restrictions have been explicitly relaxed) can drive the full Docker Engine API through Portainer's proxy. Because the Docker daemon normally runs as root on the host, an attacker can create a privileged container that bind-mounts the host root filesystem ("/:/host") and chroot into it, which yields code execution as root on the Docker host itself - not merely inside a container.
By default, Portainer blocks non-admin users from using privileged mode, bind mounts, and host PID namespaces, so this module typically requires admin-level credentials.
This module authenticates to Portainer (POST /api/auth) to obtain a JWT, selects a managed Docker environment, ensures a small Linux image is present (pulling one if required), then creates and starts a privileged container whose command drops and executes a Metasploit payload on the host via the "/host" bind mount and "chroot /host". The payload is launched through the host's own init (systemd) so it is decoupled from the throwaway container and survives its removal, and the container is then stopped and force-removed afterwards to avoid leaving artifacts.
This is an abuse of intended functionality (a design consequence of exposing the Docker API) combined with the common misconfiguration of an internet or network-reachable Portainer instance protected only by weak or shared credentials. It is not a patched CVE. Valid credentials and a root-running Docker daemon are required.
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/http/portainer/authenticated_docker_rcemsf undefined(authenticated_docker_rce) > show actions ...actions...msf undefined(authenticated_docker_rce) > set ACTION < action-name >msf undefined(authenticated_docker_rce) > show options ...show and set options...msf undefined(authenticated_docker_rce) > runPrioritize with Active Threat Intelligence
With curated Threat Intelligence, you can see which vulnerabilities truly put you at risk, prioritize what matters most, and act before attackers do.
Explore Intelligence Hub