Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft oversized /etc/passwd or /etc/group in image
-
DeliveryPublish malicious image to accessible registry
-
ExploitDeveloper or CI pipeline builds FROM malicious image
-
ExecutionBuildKit user resolution reads file without size limit
-
PersistHost memory exhausted
-
Impactbuildkitd OOM-killed
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V2 - Validation and Business Logic Resource allocation limits
MITRE ATT&CK
1 technique across 1 tactic: Impact The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires all three of the following: (1) the build uses an attacker-controlled base image containing an oversized /etc/passwd or /etc/group file; (2) the Dockerfile or build definition includes a USER instruction or a chown operation that triggers UID/GID resolution, causing BuildKit to parse the file; and (3) the buildkitd process is running a version <= 0.31.0. A developer or automated pipeline must actively pull and build from the malicious image - purely passive or read-only exposure to the image does not trigger the bug. Environments that build exclusively from internally hosted, access-controlled base images and never pull from public or untrusted registries are not reachable by external attackers. |
| Impact | The CVSS 4.0 score of 2.3 (Low) is an accurate reflection of real-world risk. The attack requires two chained prerequisites: the attacker must control or compromise a base image (AT:P), and a developer or pipeline must actively pull and build from it (UI:P). The impact is strictly availability - OOM termination of buildkitd - with no confidentiality or integrity consequences (VC:N/VI:N). The buildkitd process is typically managed by a supervisor and will restart, further limiting sustained impact. This is not in CISA KEV and no public exploit code exists, consistent with a low exploitation probability; no EPSS score was provided in the input so probability cannot be independently quantified. The realistic threat profile is supply-chain adjacent: open-source projects running CI that accepts external pull requests and builds FROM contributor-supplied base images face meaningfully higher exposure than teams working exclusively from internally vetted image registries. Organizations that restrict base image sources to trusted internal registries are largely unaffected until a patch is applied. |
| Exploit ScenarioDerived | An attacker publishes a container image to a public registry in which /etc/passwd or /etc/group has been padded to hundreds of megabytes of repeated or junk entries. When a CI/CD pipeline running a vulnerable BuildKit daemon executes a build whose Dockerfile includes FROM attacker/image followed by a USER or RUN chown directive, buildkitd calls into the user resolution path, reads the oversized file without bounds, exhausts host memory, and is terminated by the kernel OOM killer. No public exploit code exists, but the attack is straightforward to reproduce from the advisory description alone. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 19, 2026
Memory exhaustion in BuildKit prior to v0.31.1 allows a denial-of-service condition against the buildkitd daemon when it processes a maliciously crafted base image. The daemon reads /etc/passwd and /etc/group from attacker-controlled images without any size limit during UID/GID resolution, enabling an oversized file to exhaust host memory and trigger an OOM kill of buildkitd. No active exploitation has been confirmed (not in CISA KEV), no public exploit code has been identified, and the CVSS 4.0 score of 2.3 reflects the constrained impact: availability-only, requiring user interaction with a hostile image.
RemediationAI
Upgrade BuildKit to v0.31.1 or later, available at https://github.com/moby/buildkit/releases/tag/v0.31.1. The patched release applies a hard 10 MiB cap on reads from /etc/passwd and /etc/group via the limitedReadCloser wrapper; reads exceeding this threshold return an error rather than exhausting memory. If immediate patching is not feasible, the vendor advisory recommends restricting builds to trusted base image sources - concretely, configure BuildKit to pull only from internal, access-controlled registries and deny or review any build that references an external public registry as a base. This compensating control prevents exploitation but may break workflows that legitimately depend on public upstream images. There is no known runtime flag or configuration knob to disable user file parsing selectively; the source restriction is the only practical workaround short of patching.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in go, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
BuildKit (go/github.com/moby/buildkit) is an OCI-compliant container image build toolkit underpinning Docker BuildKit mode and many CI/CD platforms. During container creation, the daemon resolves USER directives and chown operations to numeric UIDs/GIDs by parsing the base image's /etc/passwd and /etc/group files. Prior to v0.31.1, both executor/oci/user.go and solver/llbsolver/ops/user_linux.go opened these files with a bare os.Open() call, applying no cap on the amount of data read into memory - a textbook CWE-770 (Allocation of Resources Without Limits or Throttling) defect. The fix, visible in commits 408266e and 69a3924, introduces a maxUserFileBytes constant (10 MiB, expressed as 10 << 20) and a limitedReadCloser struct wrapping io.LimitedReader, causing reads exceeding the limit to return an error rather than consuming unbounded memory. This vulnerability is a BuildKit-specific variant of a parallel containerd issue (GHSA-jpcc-p29g-p8mq).
Know when the next one hits your stack
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
Attacker publishes a crafted image requiring no target privileges (PR:N); a developer must pull and build it (UI:R); sole impact is restartable buildkitd crash (A:L).
Primary rating from Vendor (github).
CVSS VectorVendor: github
Lifecycle Timeline
1DescriptionCVE.org
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.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
EUVD-2026-62837
GHSA-72x6-4j93-7w86
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB