
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-61712 is a Denial of Service (DoS) vulnerability in Moby BuildKit, a toolkit for converting source code to build artifacts. Prior to version 0.31.1, BuildKit read attacker-controlled /etc/passwd and /etc/group files without an upper bound while resolving usernames to user/group identifiers in executor/oci/user.go and solver/llbsolver/ops/user_linux.go. A malicious base image or build could supply oversized files that exhaust memory during user resolution, causing an out-of-memory (OOM) termination of the buildkitd process. All versions up to and including v0.31.0 are affected. The vulnerability was published on June 24, 2026, with a CVSS v4.0 base score of 2.3 (Low) (Github Advisory, BuildKit Release).
The root cause is CWE-770 (Allocation of Resources Without Limits or Throttling): BuildKit used os.Open to read /etc/passwd and /etc/group from container images with no size cap, allowing unbounded memory allocation during username-to-UID/GID resolution. The attack vector is network-based but requires attack prerequisites (AT:P) — specifically, the attacker must be able to supply a malicious base image or build configuration that includes oversized or crafted /etc/passwd or /etc/group files. The fix, applied in commits 408266e and 69a3924, introduces a limitedReadCloser wrapper capping reads at 10 MiB and rejecting non-regular files in both the OCI executor and the chown user resolver (Commit 408266e, Commit 69a3924). This vulnerability is a BuildKit variant of the containerd advisory GHSA-jpcc-p29g-p8mq (Github Advisory).
Successful exploitation causes memory exhaustion in the buildkitd process, resulting in an OOM kill and disruption of all ongoing and queued build operations. The impact is limited to availability of the build service — there is no confidentiality or integrity impact, and no lateral movement or data exposure risk is associated with this vulnerability. In CI/CD environments relying on BuildKit, a crash of buildkitd would halt all container image builds until the process is restarted (Github Advisory).
There is no public proof-of-concept exploit and no evidence of in-the-wild exploitation at this time (Github Advisory). The EPSS score is 0.0, indicating very low probability of exploitation in the near term. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. Exploitation requires the ability to supply a malicious base image or build configuration, limiting the attacker pool to those with access to the build pipeline or image registry.
/etc/passwd or /etc/group file (e.g., a file significantly larger than 10 MiB filled with valid or arbitrary data) designed to exhaust memory when parsed.FROM malicious-image) in a Dockerfile submitted to the target build environment.USER instruction or a COPY --chown=username directive in the Dockerfile./etc/passwd or /etc/group file without bound via os.Open, consuming available memory until the OS OOM killer terminates the buildkitd process, disrupting all active builds (Github Advisory, Commit 408266e).kernel: Out of memory: Kill process <buildkitd PID>) coinciding with a build using an external or untrusted base image.buildkitd process without a clear application-level error; repeated restarts of buildkitd correlated with specific build jobs./etc/passwd or /etc/group files (>10 MiB) within container image layers pulled from external registries.buildkitd crashes.Upgrade BuildKit to version v0.31.1 or later, which caps /etc/passwd and /etc/group reads at 10 MiB and rejects non-regular files during user resolution (BuildKit Release). As a workaround, restrict builds to trusted base images and build sources only, preventing untrusted images from being used in the build pipeline (Github Advisory). Additionally, consider applying OS-level memory limits (e.g., via cgroups) on the buildkitd process to reduce the blast radius of any memory exhaustion event.
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."