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

Low 2.3 Published Updated

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

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

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

Which versions are affected by CVE-2026-61712?

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

PackageAffectedFixed in
github.com/moby/buildkit GoAll versions0.31.1
github.com/moby/buildkit GoAll versions0.31.1
github.com/moby/buildkit GoAll versions0.31.1

How do I fix CVE-2026-61712?

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

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2026-61712 being exploited?

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

Sources

Also known as AZL-97029, ECHO-b91e-82b4-59d9, GHSA-72x6-4j93-7w86, GO-2026-6256, MINI-237g-xfvh-2wjx, MINI-2pjf-v57f-wx3w and 41 more.

Is CVE-2026-61712 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free