containerd user ID handling bypass allows runAsNonRoot evasion
containerd
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| github.com/containerd/containerd Go |
|
|
| github.com/containerd/containerd/v2 Go |
|
containerd
| Product | Affected | Fixed in |
|---|---|---|
| github.com/containerd/containerd Go |
|
|
| github.com/containerd/containerd/v2 Go |
|
2.0.92.2.42.3.1containerd is an open-source container runtime. In versions prior to 1.7.32, 2.0.9, 2.2.4 and 2.3.1, containers launched with a numeric User directive that cannot be parsed as a 32-bit integer are incorrectly treated as a username, leading to runAsNonRoot evasion. If a crafted image provides an /etc/passwd file mapping this large numeric string to root, the container ultimately runs as root (UID 0). This allows the Kubernetes runAsNonRoot restriction to be bypassed, causing unexpected behavior for environments that require containers to run as a non-root user. This issue has been fixed in versions 1.7.32, 2.0.9, 2.2.4 and 2.3.1.
From the CVE record · GitHub_M
containerd can treat a numeric User directive too large for a 32-bit integer as a username. A crafted image that maps that string to root in /etc/passwd can then run as UID 0, bypassing Kubernetes runAsNonRoot when the image is launched under that restriction.
Check deployments using Go package github.com/containerd/containerd at >=1.7.27 <1.7.32 or github.com/containerd/containerd/v2 at >=2.0.4 <2.0.9, >=2.1.0-beta.0 <2.2.4, or >=2.3.0-beta.0 <2.3.1.