/

CVE-2026-46680

Severity:

HIGH RISK

(7.8)

Privilege Context Bypass (CWE-269) in containerd Runtime

CVE-2026-46680

Analyzed

Vulnerability type

Category:

Privilege Management / Authorization

CWE:

CWE-269

Impact:

runAsNonRoot Policy Bypass and Privilege Escalation

Severity:

HIGH RISK

(7.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A privilege context bypass in containerd causes certain numeric User directives that overflow 32-bit parsing to be interpreted as usernames instead of UIDs.

When a crafted image maps this large numeric string to root in /etc/passwd, Kubernetes runAsNonRoot restrictions can be silently evaded and containers may run as UID 0.

Affected context

This vulnerability appears in Kubernetes environments using containerd as the runtime, where:

  • Pod or container specifications rely on the runAsNonRoot securityContext to enforce non-root execution
  • Images specify a User directive using a large numeric string that cannot be parsed as a 32-bit integer
  • The image is able to control /etc/passwd content inside the container filesystem

Under these conditions, containerd misinterprets the large numeric value as a username and may resolve it to UID 0, undermining the expected non-root guarantees.

Exploit preconditions

  • Attack surface: Kubernetes workloads scheduled onto nodes running vulnerable versions of containerd.
  • Required access: Ability to supply or control the container image or its User directive (e.g., as a workload author or via a compromised image registry).
  • Trigger point: Container start-up, when containerd resolves the configured User into a runtime UID/GID.
  • Why exploitation is possible: The user resolution logic fails to consistently treat large numeric strings as invalid UIDs. When 32-bit parsing fails, the value is treated as a username and then mapped via /etc/passwd, allowing an attacker-controlled mapping to root and bypass of runAsNonRoot.

Why this happens

The root cause is a flawed user identity resolution algorithm in containerd that mishandles numeric-looking User values that exceed 32-bit integer limits.

Instead of rejecting such values or consistently treating them as invalid numeric UIDs, the code falls back to interpreting them as usernames and consults /etc/passwd inside the image.

This behavior corresponds to CWE-269: Improper Privilege Management, because it allows untrusted workload configuration to undermine policy-enforced non-root execution and escalate to root within the container.

Potential impact

  • Containers that appear to comply with runAsNonRoot can actually run as UID 0.
  • Bypass of Kubernetes security policies that rely on non-root enforcement.
  • Increased blast radius for container breakouts or in-container vulnerabilities due to elevated privileges.
  • Violation of compliance expectations where workloads must not execute as root.
  • Confusing or misleading audit and security posture assessments that assume non-root enforcement is effective.

General mitigation guidance

Mitigation strategies generally focus on hardening identity resolution and reducing trust in image-controlled user mappings:

  • Ensure user resolution logic treats unparseable numeric User values as invalid and fails closed rather than falling back to username lookups.
  • Enforce consistent policy that numeric-looking User fields must resolve to valid non-root UIDs or be rejected outright.
  • Prefer runtime-level admission policies that validate the effective UID inside containers, not just the presence of runAsNonRoot.
  • Isolate or restrict the ability of workloads to control /etc/passwd or identity mapping files where feasible.
  • Apply least-privilege principles for container capabilities and filesystem permissions so that unexpected root execution has constrained impact.

How teams detect issues like this

Detection can leverage both configuration analysis and runtime observation:

  • Use static checks or policy-as-code (e.g., admission controllers, OPA, Kyverno) to flag pod specs whose User directives use unusually large numeric values.
  • Add CI/CD validation for container images that examine /etc/passwd for suspicious mappings, such as non-standard usernames or numeric strings mapped to UID 0.
  • Employ runtime security tooling to monitor effective UIDs of containers labeled or expected to run as non-root, and alert when they start as root despite runAsNonRoot.
  • During code review of container runtimes or orchestration tooling, scrutinize user/UID parsing logic for fallback behaviors, type overflows, or ambiguous interpretation of numeric fields.

Sources

SourceLink
github.comgithub.com/containerd/containerd/security/advisories/GHSA-fqw6-gf59-qr4w

Frequently asked

questions

It is not a remote code execution issue by itself. Exploitation typically occurs when an attacker can influence the container image or workload configuration, enabling them to craft a User directive and /etc/passwd mapping that results in root execution.

An attacker generally needs the ability to publish or modify images used in the cluster, or to define pod specifications that reference those images. In multi-tenant clusters, a malicious tenant could abuse this to bypass non-root policies applied to their workloads.

The safest pattern is to enforce strict, deterministic UID resolution: treat purely numeric User values as UIDs only when they parse within the expected range, and otherwise fail container startup rather than falling back to username resolution. Additionally, ensure that policy enforcement checks the effective runtime UID, not just configuration intent.

Future prevention should include careful handling of identity fields, consistent parsing rules that avoid overflow and ambiguity, comprehensive tests for edge-case user specifications, and defense-in-depth policies that validate actual runtime privileges through admission control and runtime monitoring.

Find out what's already
exploitable in your codebase.