Cloudanix VulnDB

CVE-2026-61712

None

CVSS

—

EPSS

0.4%

Published

Aug 19, 2026

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

A malicious container image can crash the tool that turns source code into runnable software by feeding it extremely large user-account files, stopping builds until the service is restarted.

Exploitation
Requires User Interaction
Attacker needs
User Interaction
Complexity
Moderate
Impact
Denial Of Service
Component
Application
Class
Denial of service
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Unbounded reading of attacker-supplied /etc/passwd and /etc/group files during username-to-UID/GID resolution in executor/oci/user.go and solver/llbsolver/ops/user_linux.go exhausts memory and terminates the buildkitd process.

Why it matters to the business

Build pipelines that rely on BuildKit can be halted by a single malicious image or build definition, causing repeated build failures, delayed releases, and wasted compute resources until the daemon is restarted.

How an attack unfolds

An attacker supplies a base image or build context containing oversized /etc/passwd and /etc/group files; when BuildKit resolves a user or group name, it reads the entire files into memory without limits, triggering OOM termination of buildkitd.

How to fix it

Upgrade BuildKit to version 0.31.1 or later. Restart any running buildkitd instances after the upgrade and verify the new version is active before accepting builds from untrusted sources.

How to confirm the fix worked

Run 'buildkitd --version' and confirm the output shows 0.31.1 or newer; attempt a build that references a user name while monitoring buildkitd memory usage to ensure the process no longer grows unbounded.

Typical attack path

  1. Craft a container image or build context embedding large /etc/passwd and /etc/group files
  2. Reference a username or group name in the Dockerfile or build request that triggers user resolution
  3. Submit the build to a BuildKit instance
  4. BuildKit reads the oversized files without bounds during UID/GID lookup
  5. buildkitd process exhausts memory and is terminated by the OOM killer

How to detect it

Review build logs and daemon logs for sudden spikes in memory usage followed by process termination events around the time of user-resolution steps; correlate with builds that reference non-standard user or group names.

What your security team should do

  • Immediately upgrade all BuildKit deployments to 0.31.1 or later
  • Restrict build contexts and base images to trusted sources until patches are applied
  • Monitor buildkitd process memory and restart counts in container orchestration platforms
  • Add BuildKit version checks to CI pipeline health dashboards

The record

BuildKit is a toolkit for converting source code to build artifacts in an efficient, expressive and repeatable manner. Prior to 0.31.1, BuildKit read attacker-controlled /etc/passwd and /etc/group files without an upper bound while resolving a username to a user identifier or group identifier in executor/oci/user.go and solver/llbsolver/ops/user_linux.go. A malicious base image or build could provide oversized files that exhausted memory during user resolution and caused out-of-memory termination of the buildkitd process. This issue is fixed in version 0.31.1.

Affected packages

Ecosystem Package Introduced Fixed

Related vulnerabilities