Skip to main content

BuildKit CVE-2026-61712

| EUVDEUVD-2026-62837 LOW
Allocation of Resources Without Limits or Throttling (CWE-770)
2026-08-19 security-advisories@github.com GHSA-72x6-4j93-7w86
2.3
CVSS 4.0 · Vendor: github
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft oversized /etc/passwd or /etc/group in image
  2. Delivery
    Publish malicious image to accessible registry
  3. Exploit
    Developer or CI pipeline builds FROM malicious image
  4. Execution
    BuildKit user resolution reads file without size limit
  5. Persist
    Host memory exhausted
  6. Impact
    buildkitd 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.

Monitor Track and reassess. Why: LOW severity (CVSS 0.1-3.9).
Patch available 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

buildkit < 0.31.1

Affected Packages

go github.com/moby/buildkit fix: 0.31.1
euvd buildkit fix: 0.31.1

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

Vendor (github) PRIMARY 2.3 LOW
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
vuln.today AI 4.3 MEDIUM

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).

3.1 AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L
4.0 AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N

Primary rating from Vendor (github).

CVSS VectorVendor: github

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

1
Patch available
Aug 19, 2026 - 21:17 EUVD

DescriptionCVE.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

EPSS Score
0.4%
Top 66% exploitable
Prevalence
Medium
core build toolkit backing Docker BuildKit mode and many CI/CD platforms
Threat Intel
1
1 sources
Data Quality
6 sources
Confidence: High

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.

SignalValue
Severity LOW
CISA KEV No
Public POC No
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
LOW severity (CVSS 0.1-3.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Low
Technical Impact
Partial

Priority Score

12
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +12
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy