Executive brief
nsenter is a Linux utility used by system administrators to enter namespaces and cgroups for container and process management. A vulnerability in the --join-cgroup option leaves a file descriptor open with root privileges across namespace and credential changes, allowing an unprivileged user to inherit root's ability to move host processes between cgroups. An attacker can exploit this to disrupt critical system services or force termination of unrelated processes running as root.
Technical details
The vulnerability exists in nsenter's --join-cgroup implementation, which opens the target cgroup.procs file as root but fails to close the file descriptor before executing namespace and credential changes via execve(). The kernel's cgroup migration checks rely on credentials captured at open time; because the file descriptor remains open with root credentials, a program running in an attacker-controlled target can inherit and reuse those elevated permissions. An unprivileged user can then migrate and terminate unrelated root processes after a privileged operator uses --join-cgroup against the compromised target. This requires a privileged user to first execute nsenter --join-cgroup against an attacker-controlled namespace, making it a post-exploitation privilege escalation vector rather than a direct remote attack.
Affected products
- util-linux nsenter <UNKNOWN>
Timeline
- 2026-09-02: disclosed