NVIDIAScape - Critical NVIDIA AI Vulnerability: A Three-Line Container Escape in NVIDIA Container Toolkit (CVE-2025-23266)
A flaw in the NVIDIA Container Toolkit's OCI hook handling lets a malicious container set environment variables that are inherited by a privileged host process, allowing it to load a malicious library and escape to the host. An attacker could gain full root access to the host and access other customers' data on shared GPU infrastructure.
Published on wiz.io
Wiz Research discovered a critical container escape vulnerability in the NVIDIA Container Toolkit (NCT), which we've dubbed #NVIDIAScape. This toolkit powers many AI services offered by cloud and SaaS providers, and the vulnerability, now tracked as CVE-2025-23266, has been assigned a CVSS score of 9.0 (Critical).
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
The createContainer hook inherits environment variables from the container image, and the toolkit does not sanitise them, allowing LD_PRELOAD to load a malicious library from the container's filesystem into the privileged hook process.
Impact
A malicious container could escape isolation and gain full root access to the host, potentially allowing access to, theft of, or manipulation of other customers' data and models on shared GPU infrastructure.
What the attacker needed
Ability to run a container on a vulnerable host; NVIDIA Container Toolkit vulnerable version; container runtime configured with NVIDIA runtime
The fix
Upgrade to the latest version of the NVIDIA Container Toolkit (v1.17.8 or later) as advised in NVIDIA's security bulletin; if unable to upgrade, disable the enable-cuda-compat hook.
How it was found
- Build a container image with a malicious shared library and a Dockerfile that sets LD_PRELOAD to point to it.
- Run the container on a host with the vulnerable NVIDIA Container Toolkit using the NVIDIA runtime and GPU access.
- The createContainer hook inherits LD_PRELOAD and loads the malicious library from the container's filesystem, executing code as root on the host.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
Containers are meant to keep programs separate from the rest of the computer, like a box. This bug lets a program inside the box trick a trusted helper on the outside into running its code, so it breaks out of the box and takes control of the whole machine.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.