Back to Blog
high SEVERITY7 min read

How Privilege Escalation via Incorrect User ID Handling Happens in Go and How to Fix It

A high-severity privilege escalation vulnerability (CVE-2026-46680) was discovered in containerd v1.7.31, where incorrect user ID handling could allow an attacker to escalate privileges within container environments. The fix upgrades the `github.com/containerd/containerd` dependency from v1.7.31 to v1.7.32, which corrects the UID handling logic and introduces additional transitive dependencies for secure path resolution.

O
By Orbis AppSec
•Technically reviewed by Anupam Mediratta•Published August 21, 2026•Reviewed August 21, 2026

Answer Summary

CVE-2026-46680 is a high-severity privilege escalation vulnerability in the Go container runtime library `github.com/containerd/containerd` (v1.7.31), caused by incorrect user ID (UID) handling that maps to CWE-269 (Improper Privilege Management). The fix is to upgrade the containerd dependency to v1.7.32 in your `go.mod` file, which corrects the UID resolution logic and adds secure path traversal protections via `go-pathrs`.

Vulnerability at a Glance

cweCWE-269 (Improper Privilege Management)
fixUpgrade github.com/containerd/containerd from v1.7.31 to v1.7.32
riskContainer breakout or unauthorized privilege gain within containerized workloads
languageGo
root causeIncorrect user ID resolution in containerd allowed processes to run with unintended elevated privileges
vulnerabilityPrivilege Escalation via Incorrect User ID Handling

Introduction

In a Go project's go.mod file, the dependency github.com/containerd/containerd at version v1.7.31 was flagged by Trivy as carrying CVE-2026-46680—a high-severity privilege escalation vulnerability caused by incorrect user ID handling within the containerd container runtime. This isn't a hypothetical risk: any application that uses containerd to manage containers (orchestration tools, CI/CD runners, developer environments) could allow an attacker to run processes with elevated privileges they should never have had.

The vulnerable line in go.mod was straightforward:

github.com/containerd/containerd v1.7.31

This single dependency declaration pulled in a version of containerd where UID resolution logic could be tricked into assigning incorrect privileges to container processes. The fix—upgrading to v1.7.32—not only patches the core logic but also introduces new transitive dependencies that harden path resolution and type safety within the container lifecycle.

The Vulnerability Explained

What Went Wrong in containerd v1.7.31

Containerd is the industry-standard container runtime that sits beneath Docker, Kubernetes, and many other container orchestration systems. When a container is launched with a specific user (e.g., USER 1000 in a Dockerfile, or runAsUser: 1000 in a Kubernetes pod spec), containerd is responsible for resolving that user ID and ensuring the container process runs with exactly those privileges.

In v1.7.31, the UID handling logic contained a flaw where certain user ID inputs were not correctly validated or resolved. This means:

  1. An attacker could craft a container image or runtime specification with a specially constructed user ID value
  2. The containerd runtime would incorrectly resolve this value
  3. The resulting process could run as root (UID 0) or another privileged user instead of the intended unprivileged user

Attack Scenario

Consider an application that uses this project's Go binary to orchestrate containers. An attacker who can influence container specifications (through a CI/CD pipeline, a multi-tenant platform, or a compromised container image) could:

  1. Submit a container spec with a maliciously crafted user ID field
  2. Containerd v1.7.31 incorrectly resolves this UID due to the handling bug
  3. The container process launches with root privileges
  4. The attacker now has elevated access within the container, potentially enabling:
    - Reading sensitive mounted secrets
    - Modifying shared volumes
    - Exploiting kernel vulnerabilities for container escape
    - Pivoting to other containers or the host system

Why This Is High Severity

This vulnerability is rated HIGH because:
- Low attack complexity: Exploiting UID handling requires only control over container specifications
- No user interaction needed: The vulnerability triggers automatically during container creation
- High impact: Privilege escalation can lead to full container compromise and potential host compromise
- Wide blast radius: containerd underpins most container deployments globally

The Fix

Primary Change: Dependency Upgrade

The core fix upgrades the containerd dependency in go.mod:

Before:

github.com/containerd/containerd v1.7.31

After:

github.com/containerd/containerd v1.7.32

New Transitive Dependencies

The upgrade to v1.7.32 introduces several new indirect dependencies that reflect the hardening work done upstream:

cyphar.com/go-pathrs v0.2.1 // indirect
github.com/AdaLogics/go-fuzz-headers v0.0.0-20240806141605-e8a1dd7889d6 // indirect
github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20230306123547-8075edf89bb0 // indirect
github.com/containerd/containerd/api v1.8.0 // indirect
github.com/containerd/fifo v1.1.0 // indirect
github.com/containerd/ttrpc v1.2.7 // indirect
github.com/containerd/typeurl/v2 v2.2.0 // indirect
github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c // indirect

Each of these serves a specific security purpose:

Dependency Purpose
cyphar.com/go-pathrs Provides safe, race-free path resolution—critical for preventing symlink attacks during UID lookup in /etc/passwd within container filesystems
go-fuzz-headers / go-118-fuzz-build Fuzz testing infrastructure that was used to discover and validate the fix for the UID handling bug
containerd/containerd/api v1.8.0 Updated API definitions with corrected user specification types
containerd/ttrpc v1.2.7 Hardened RPC layer for shim-to-runtime communication where UID information is transmitted
containerd/typeurl/v2 v2.2.0 Type-safe URL handling for container specs, preventing type confusion in user fields
containerd/fifo v1.1.0 Secure FIFO handling for container I/O streams
docker/go-events Event system for container lifecycle tracking

Why go-pathrs Is Particularly Important

The addition of cyphar.com/go-pathrs v0.2.1 is significant. When containerd resolves a user ID, it often needs to read /etc/passwd inside the container's root filesystem. Without safe path resolution, an attacker could use symlinks to trick the runtime into reading a different file, potentially returning a crafted UID 0 entry. The go-pathrs library provides kernel-level safe path traversal that eliminates this class of attack.

Behavior Preservation

The upgrade is scoped to only go.mod and go.sum—the dependency declaration files. The application's own code remains unchanged. The containerd library maintains backward compatibility between patch versions (v1.7.31 → v1.7.32), so all valid container operations continue to work identically. The only behavioral change is that malicious or malformed UID inputs are now correctly rejected rather than incorrectly resolved.

Key Takeaways

  • containerd's UID resolution is a critical security boundary—a single bug in user ID handling can escalate an unprivileged container process to root
  • The addition of go-pathrs in v1.7.32 indicates the fix addresses symlink-based attacks during filesystem-level UID resolution within container root filesystems
  • Fuzz testing dependencies (go-fuzz-headers) appearing as transitive deps suggest this bug was found or validated through fuzzing—a reminder that fuzz testing container runtimes catches real privilege escalation bugs
  • A one-line version bump in go.mod can carry enormous security implications—the diff looks trivial but fixes a high-severity privilege escalation
  • Defense in depth matters: even if your runtime has a UID handling bug, user namespaces and seccomp profiles provide additional barriers against exploitation

How Orbis AppSec Detected This

  • Source: Container specification user ID field processed by github.com/containerd/containerd runtime during container creation
  • Sink: UID resolution logic in containerd v1.7.31's user handling code path, where the user-supplied ID is mapped to actual process credentials
  • Missing control: Proper validation and safe resolution of user ID values, including protection against symlink-based path traversal during /etc/passwd lookups in container filesystems
  • CWE: CWE-269 (Improper Privilege Management)
  • Fix: Upgraded github.com/containerd/containerd from v1.7.31 to v1.7.32 in go.mod, which corrects UID handling logic and adds secure path resolution via go-pathrs

Orbis AppSec automatically detected this vulnerability and opened a pull request with the fix. Try Orbis AppSec on your repositories to find and fix issues like this automatically.

Conclusion

CVE-2026-46680 is a stark reminder that container runtimes are trust boundaries, and their user ID handling logic is one of the most security-critical code paths in the entire container stack. A bug that causes incorrect UID resolution can instantly negate all of your "run as non-root" security policies.

The fix—upgrading from containerd v1.7.31 to v1.7.32—is minimal in terms of code changes but maximal in security impact. The introduction of go-pathrs for safe path resolution and updated API types demonstrates that the containerd maintainers addressed not just the symptom but the underlying class of vulnerability.

If your Go projects depend on containerd (directly or transitively), audit your go.mod immediately and ensure you're running v1.7.32 or later. And remember: dependency management isn't just about features—it's a critical security practice.

Prevention and further reading

View the Security Fix

Check out the pull request that fixed this vulnerability

View PR #11634

Related Articles

critical

Lampa Desktop Auto-Update Heuristic Bypass: Execution of Unverified

Lampa Desktop's auto-update mechanism downloaded JavaScript and CSS from `raw.githubusercontent.com` using only heuristic validation—file size thresholds and string pattern matching—that attackers could trivially satisfy. The fix introduces cryptographic integrity verification by cross-referencing Git blob hashes from the GitHub Contents API, ensuring downloaded code matches the repository's authoritative state before execution.

high

adm-zip 0.6.0 Preserves SUID Bits From ZIPs: CVE-2026-102282

The `adm-zip` dependency resolved to 0.6.0 in this project's dependency tree, a version affected by CVE-2026-102282: during extraction it applies the Unix permission bits stored in each ZIP entry's external file attributes verbatim, including the setuid (`04000`), setgid (`02000`), and sticky bits. An attacker who controls an archive passed to `extractAllTo()` or `extractEntryTo()` can therefore have the extractor create a setuid binary owned by whatever user the extraction process runs as. The

high

requestInput() Type Confusion: NaN and Object Bypass in JavaScript

The `requestInput()` utility function lacked validation on its `type` parameter and failed to handle `NaN` results from float conversions, creating a type confusion weakness. An attacker could supply malformed inputs that propagate unhandled `NaN` values or unexpected object types through the type system. The fix adds explicit guards against `NaN` type parameters and rejects non-primitive type values.

critical

No Rate Limit on /api/uploads/presign Enables DoS

The `/api/uploads/presign` endpoint accepted unlimited concurrent requests to generate storage presigned URLs, giving an attacker a free lever to exhaust storage-provider quotas and server resources. The fix adds an `express-rate-limit` middleware capping each client to 30 requests per minute on that route.

high

CVE-2026-54673: builder-util-runtime Leaks Auth Headers on Redirect

electron-updater and electron-builder rely on builder-util-runtime to fetch update manifests and artifacts over HTTP. A flaw in that shared HTTP executor allowed credential headers attached to the original update-feed request to be re-sent after a redirect, exposing them to any host the redirect pointed to. The project fixes this by upgrading builder-util-runtime to 9.7.0 and collapsing a duplicate, older copy of the package that electron-updater had pinned on its own.

high

image-size 1.2.1 DoS: Zero-Valued Dimensions in Image Buffer Parser

A high-severity denial-of-service vulnerability in image-size 1.2.1 allows attackers to crash Node.js services using malicious image buffers with zero-valued dimensions. The fix removes the vulnerable `queue` dependency and tightens dimension validation in version 2.0.3.