# CVE-2026-61712: BuildKit: Possible runtime DoS via unbounded group parsing

> A malicious base image can cause BuildKit to exhaust memory and crash by providing oversized group files during user resolution.

- **Severity:** Low 2.3 (`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`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 19 Aug 2026
- **Updated:** 21 Aug 2026
- **Also known as:** AZL-97029, ECHO-b91e-82b4-59d9, GHSA-72x6-4j93-7w86, GO-2026-6256, MINI-237g-xfvh-2wjx, MINI-2pjf-v57f-wx3w, MINI-3ccm-jgv2-4mw6, MINI-3mh9-xwj3-888p, MINI-3q75-j58r-mf48, MINI-4fmr-85cf-cq68, MINI-4qj5-978m-63ww, MINI-4qp7-jx4j-qcjp, MINI-553p-h93r-j8rw, MINI-5f5q-2hvr-hp5j, MINI-5gr6-f4vm-x5qr, MINI-66qh-chw4-ppxj, MINI-6fq9-38g7-h23x, MINI-7pvh-57wq-4837, MINI-7r8m-j94h-4pc9, MINI-7x3h-48gh-r9pj, MINI-92gq-r73m-3f9f, MINI-96x8-j5qp-q6jm, MINI-9xc3-46mw-5j4q, MINI-gh85-8j9m-34xq, MINI-h2g6-r686-6vqg, MINI-h8q3-6c23-fvqv, MINI-hc3v-wgc2-5vcg, MINI-hp87-683m-63jr, MINI-jf95-ww4r-hh4g, MINI-m436-vxpv-g89r, MINI-m4j9-9wgv-66gq, MINI-m5h9-2vgc-8gw9, MINI-mfg8-2hwr-5wfr, MINI-p3pm-pwj2-22gh, MINI-pfjm-rwgj-m84r, MINI-pvmx-325j-56m4, MINI-q38r-322m-5jg6, MINI-q555-rj56-pr69, MINI-qm53-8wj3-pm6x, MINI-rqw2-2q59-f46x, MINI-rqwh-j23w-g8qq, MINI-vvhp-75j9-wxr2, MINI-w73q-q6fj-rc27, MINI-w8wx-fp32-v88c, MINI-w968-cgjp-m978, MINI-wvfr-gq75-hph9, MINI-xmp4-2mf3-xgxm

## What is CVE-2026-61712?

CVE-2026-61712 is a low-severity denial of service vulnerability in moby buildkit, published on 19 Aug 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

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.

Weakness: CWE-770 (Allocation of Resources Without Limits or Throttling)

## Which versions are affected by CVE-2026-61712?

3 open source packages ship an affected version, including github.com/moby/buildkit.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/moby/buildkit` | Go | All versions | 0.31.1 |
| `github.com/moby/buildkit` | Go | All versions | 0.31.1 |
| `github.com/moby/buildkit` | Go | All versions | 0.31.1 |

## How do I fix CVE-2026-61712?

Upgrade github.com/moby/buildkit to 0.31.1 or later.

## Is CVE-2026-61712 being exploited?

There is no known exploitation of CVE-2026-61712 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-61712 and fix it if it is affected.

What it is: CVE-2026-61712 is a low-severity denial of service vulnerability in moby buildkit, published on 19 Aug 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2026-61712 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/moby/buildkit (Go): affected all versions; fixed in 0.31.1
- github.com/moby/buildkit (Go): affected all versions; fixed in 0.31.1
- github.com/moby/buildkit (Go): affected all versions; fixed in 0.31.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-61712/ (Markdown: https://insights.sbomify.com/CVE-2026-61712/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-61712
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-61712
- OSV: https://osv.dev/vulnerability/CVE-2026-61712

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-61712/
Summaries are generated and may contain mistakes; the official description above is the record.
