Cloudanix VulnDB

CVE-2024-36621

Medium · 6.5

Moby Race Condition vulnerability

CVSS

6.5

EPSS

0.6%

Published

Nov 29, 2024

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

A timing flaw in the Docker build system lets attackers drain resources by starting several builds at once, which can slow down or stop new image creation.

Exploitation
Remote Authenticated
Attacker needs
Low Privilege
Complexity
Moderate
Impact
Denial Of Service
Component
Container Runtime
Class
Race Condition
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Race condition in builder/builder-next/adapters/snapshot/layer.go allows concurrent calls to EnsureLayer from multiple builds, resulting in resource leaks or exhaustion.

Why it matters to the business

Organizations relying on container builds may experience denial of service on build infrastructure, disrupting CI/CD pipelines and image creation workflows with low immediate risk due to absence from known exploitation lists and stable low exploit probability.

How an attack unfolds

An attacker triggers multiple concurrent builds that invoke EnsureLayer in parallel, exploiting the missing synchronization to repeatedly leak resources until exhaustion occurs.

How to fix it

Upgrade moby/moby to the commit 37545cc644344dcb576cba67eb7b6f51a463d31e or later release that resolves the race condition in layer.go.

How to confirm the fix worked

Confirm presence of synchronization primitives around EnsureLayer in layer.go after applying the fix; test by attempting concurrent builds and monitoring for resource leaks.

Typical attack path

  1. Obtain ability to initiate builds against the affected builder
  2. Schedule or trigger multiple builds to execute simultaneously
  3. Invoke EnsureLayer concurrently without proper locking
  4. Repeat operations to accumulate resource leaks
  5. Achieve exhaustion of memory, file descriptors, or other build resources

How to detect it

Review builder logs for simultaneous EnsureLayer invocations and correlate with spikes in resource usage on build hosts; no widespread exploitation reported.

What your security team should do

  • Apply the fix commit 37545cc644344dcb576cba67eb7b6f51a463d31e immediately on all build nodes
  • Implement build queuing or rate limiting to reduce concurrent build risk until patched
  • Monitor builder resource consumption for unusual exhaustion patterns

The record

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.

Affected packages

Ecosystem Package Introduced Fixed
Go github.com/moby/moby 0 26.0.0+incompatible
Go github.com/moby/moby 0 26.0.0
Chainguard cert-manager-1.12 0 1.12.17-r10
Chainguard cert-manager-acmesolver-1.12 0 1.12.17-r10
Chainguard cert-manager-acmesolver-1.12-iamguarded-compat 0 1.12.17-r10
Chainguard cert-manager-controller-1.12 0 1.12.17-r10
Chainguard cert-manager-controller-1.12-iamguarded-compat 0 1.12.17-r10
Chainguard cert-manager-webhook-1.12 0 1.12.17-r10
Chainguard cmctl-1.12 0 1.12.17-r10
Chainguard docker-machine-driver-harvester 0 1.0.5-r0
Chainguard flux-compat 0 2.7.3-r0
Chainguard kubevela 0 1.9.13-r2
Chainguard kubevela-vela-cli 0 1.9.13-r2
Chainguard kubevela-vela-core 0 1.9.13-r2
Chainguard kubevela-vela-core-compat 0 1.9.13-r2
Chainguard pulumi 0 3.142.0-r1
Chainguard pulumi-language-go 0 3.142.0-r1
Chainguard pulumi-language-nodejs 0 3.142.0-r1
Chainguard pulumi-language-python 0 3.142.0-r1
Chainguard py3-docker 0 0
Chainguard py3-supported-docker 0 0
Chainguard py3.10-docker 0 0
Chainguard py3.11-docker 0 0
Chainguard py3.12-docker 0 0
Chainguard py3.13-docker 0 0
Chainguard rancher-2.10 0 0
Chainguard rancher-2.11 0 0
Chainguard rancher-agent-2.10 0 0
Chainguard rancher-agent-2.11 0 2.11.9-r0
Chainguard rancher-agent-2.8 0 0
Chainguard rancher-agent-2.9 0 0
Chainguard rancher-machine 0 0.15.0.137-r0
Chainguard vela-cli 0 1.9.13-r2
Chainguard vela-core 0 1.9.13-r2
Debian:11 docker.io 0 No fix
Debian:12 docker.io 0 No fix
Debian:13 docker.io 0 26.1.4+dfsg1-9
Ubuntu:20.04:LTS docker.io 0 No fix
Ubuntu:20.04:LTS docker.io-app 0 No fix
Ubuntu:22.04:LTS docker.io 0 No fix
Ubuntu:22.04:LTS docker.io-app 0 No fix
Ubuntu:22.04:LTS docker.io-app 0 27.5.1-0ubuntu3~22.04.2
Ubuntu:24.04:LTS docker.io 0 No fix
Ubuntu:24.04:LTS docker.io-app 0 No fix
Ubuntu:24.04:LTS docker.io-app 0 27.5.1-0ubuntu3~24.04.2
Ubuntu:24.10 docker.io 0 No fix
Ubuntu:24.10 docker.io-app 0 No fix
Ubuntu:25.04 docker.io 0 No fix
Ubuntu:25.04 docker.io-app 0 No fix
Ubuntu:25.10 docker.io 0 No fix
Ubuntu:25.10 docker.io-app 0 No fix
Ubuntu:Pro:16.04:LTS docker.io 0 No fix
Ubuntu:Pro:18.04:LTS docker.io 0 No fix
Ubuntu:Pro:18.04:LTS docker.io 0 20.10.21-0ubuntu1~18.04.3+esm3
Ubuntu:Pro:20.04:LTS docker.io 0 20.10.21-0ubuntu1~20.04.6+esm2
Ubuntu:Pro:20.04:LTS docker.io-app 0 No fix
Ubuntu:Pro:20.04:LTS docker.io-app 0 26.1.3-0ubuntu1~20.04.1+esm1
Ubuntu:Pro:22.04:LTS docker.io 0 20.10.21-0ubuntu1~22.04.7+esm2
Ubuntu:Pro:24.04:LTS docker.io 0 20.10.25+dfsg1-2ubuntu1+esm2
Wolfi cert-manager-1.12 0 1.12.17-r10
Wolfi cmctl-1.12 0 1.12.17-r10
Wolfi docker-machine-driver-harvester 0 1.0.5-r0
Wolfi flux-compat 0 2.7.3-r0
Wolfi kubevela 0 1.9.13-r2
Wolfi kubevela-vela-cli 0 1.9.13-r2
Wolfi kubevela-vela-core 0 1.9.13-r2
Wolfi kubevela-vela-core-compat 0 1.9.13-r2
Wolfi pulumi 0 3.142.0-r1
Wolfi pulumi-language-go 0 3.142.0-r1
Wolfi pulumi-language-nodejs 0 3.142.0-r1
Wolfi pulumi-language-python 0 3.142.0-r1
Wolfi py3-docker 0 0
Wolfi py3-supported-docker 0 0
Wolfi py3.10-docker 0 0
Wolfi py3.11-docker 0 0
Wolfi py3.12-docker 0 0
Wolfi py3.13-docker 0 0
Wolfi rancher-2.10 0 0
Wolfi rancher-2.11 0 0
Wolfi rancher-agent-2.10 0 0
Wolfi rancher-agent-2.11 0 2.11.9-r0
Wolfi rancher-agent-2.8 0 0
Wolfi rancher-agent-2.9 0 0
Wolfi rancher-machine 0 0.15.0.137-r0
Wolfi vela-cli 0 1.9.13-r2
Wolfi vela-core 0 1.9.13-r2
openSUSE:Tumbleweed govulncheck-vulndb 0 0.0.20241209T183251-1.1

Related vulnerabilities