/

CVE-2026-15792

Severity:

HIGH RISK

(7.5)

Input Validation Flaw (CWE-20) in BuildKit Daemon

CVE-2026-15792

Analyzed

Vulnerability type

Category:

Input Validation

CWE:

CWE-20

Impact:

Denial of Service

Severity:

HIGH RISK

(7.5)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A crafted request from a malicious BuildKit client or frontend can trigger improper input handling in the BuildKit daemon, resulting in a panic and crash.

When untrusted or malformed build requests reach the daemon without adequate validation, the service may become unavailable and disrupt build pipelines.

A crafted request from a malicious BuildKit client or frontend can trigger improper input handling in the BuildKit daemon, resulting in a panic and crash.

When untrusted or malformed build requests reach the daemon without adequate validation, the service may become unavailable and disrupt build pipelines.

Affected context

This vulnerability manifests in environments where BuildKit is used as a build backend and exposes its daemon to client or frontend requests.

It is most relevant when clients are not fully trusted, or when external systems can programmatically submit build jobs.

Under these conditions, a specially structured request may traverse the request handling path without sufficient validation, causing the daemon to panic and terminate.

This vulnerability manifests in environments where BuildKit is used as a build backend and exposes its daemon to client or frontend requests.

It is most relevant when clients are not fully trusted, or when external systems can programmatically submit build jobs.

Under these conditions, a specially structured request may traverse the request handling path without sufficient validation, causing the daemon to panic and terminate.

Exploit preconditions

  • Attack surface: BuildKit daemon API or request interface exposed to clients/frontends
  • Required access: Ability to send build or control requests to the BuildKit daemon
  • Trigger point: Processing of a crafted, malformed, or unexpected request by the daemon
  • Why exploitation is possible: Request parameters are not robustly validated, allowing invalid state or unexpected input to reach logic that panics
  • Attack surface: BuildKit daemon API or request interface exposed to clients/frontends
  • Required access: Ability to send build or control requests to the BuildKit daemon
  • Trigger point: Processing of a crafted, malformed, or unexpected request by the daemon
  • Why exploitation is possible: Request parameters are not robustly validated, allowing invalid state or unexpected input to reach logic that panics

Why this happens

The underlying issue is incomplete or insufficient validation of incoming request data before it is processed by the BuildKit daemon.

Logic that assumes well-formed input may dereference invalid structures, operate on out-of-range values, or hit impossible branches, leading to explicit panics.

This aligns with CWE-20: Improper Input Validation, where failure to sanitize or constrain external inputs allows them to drive the program into unstable states.

The underlying issue is incomplete or insufficient validation of incoming request data before it is processed by the BuildKit daemon.

Logic that assumes well-formed input may dereference invalid structures, operate on out-of-range values, or hit impossible branches, leading to explicit panics.

This aligns with CWE-20: Improper Input Validation, where failure to sanitize or constrain external inputs allows them to drive the program into unstable states.

Potential impact

  • The BuildKit daemon may crash, causing denial of service for build operations
  • Automated build pipelines could stall or fail unexpectedly
  • Orchestrated deployments and CI/CD workflows may be delayed or disrupted
  • Operational teams may need to intervene manually to restart or recover services
  • The BuildKit daemon may crash, causing denial of service for build operations
  • Automated build pipelines could stall or fail unexpectedly
  • Orchestrated deployments and CI/CD workflows may be delayed or disrupted
  • Operational teams may need to intervene manually to restart or recover services

General mitigation guidance

Addressing this class of vulnerability generally involves strengthening input validation and error handling around all externally sourced requests.

Defensive patterns include:

  • Applying strict validation and type checking on all client-supplied parameters
  • Treating all build requests as untrusted and enforcing bounds, formats, and allowed values
  • Converting unexpected input into controlled error responses rather than panics
  • Isolating the daemon with least-privilege and resource constraints to limit broader impact of failures

Designing request handlers to fail gracefully instead of panicking reduces the risk of service-wide crashes.

Addressing this class of vulnerability generally involves strengthening input validation and error handling around all externally sourced requests.

Defensive patterns include:

  • Applying strict validation and type checking on all client-supplied parameters
  • Treating all build requests as untrusted and enforcing bounds, formats, and allowed values
  • Converting unexpected input into controlled error responses rather than panics
  • Isolating the daemon with least-privilege and resource constraints to limit broader impact of failures

Designing request handlers to fail gracefully instead of panicking reduces the risk of service-wide crashes.

How teams detect issues like this

Detection commonly focuses on both code-level and operational signals:

  • Static analysis rules that flag unchecked input paths and panic-prone code segments
  • Code review checklists emphasizing validation of all fields derived from external clients
  • Runtime monitoring for repeated daemon crashes correlated with specific request patterns
  • Logging and observability around request parsing and error handling to identify malformed input

Automated tools integrated into CI can help identify missing validation or direct panics in request handling code before deployment.

Detection commonly focuses on both code-level and operational signals:

  • Static analysis rules that flag unchecked input paths and panic-prone code segments
  • Code review checklists emphasizing validation of all fields derived from external clients
  • Runtime monitoring for repeated daemon crashes correlated with specific request patterns
  • Logging and observability around request parsing and error handling to identify malformed input

Automated tools integrated into CI can help identify missing validation or direct panics in request handling code before deployment.

Sources

SourceLink
github.comgithub.com/moby/buildkit/security/advisories/GHSA-qx3x-mv6r-52p6

Frequently asked

questions

Exploitation is possible wherever an attacker or untrusted client can send requests to the BuildKit daemon. In tightly controlled environments with only trusted clients, the practical risk is reduced but not eliminated.

An attacker must be able to reach the BuildKit daemon interface and submit build or control requests. Network segmentation, authentication, and access controls can significantly limit this capability.

The most robust fix pattern is to enforce strict input validation on all externally sourced request fields, combined with defensive error handling that returns controlled errors instead of triggering panics.

Future designs should treat all client inputs as untrusted, define explicit schemas and constraints for request data, adopt coding standards that prohibit unguarded panics in request paths, and use automated analysis plus thorough reviews to enforce these policies.

Exploitation is possible wherever an attacker or untrusted client can send requests to the BuildKit daemon. In tightly controlled environments with only trusted clients, the practical risk is reduced but not eliminated.

An attacker must be able to reach the BuildKit daemon interface and submit build or control requests. Network segmentation, authentication, and access controls can significantly limit this capability.

The most robust fix pattern is to enforce strict input validation on all externally sourced request fields, combined with defensive error handling that returns controlled errors instead of triggering panics.

Future designs should treat all client inputs as untrusted, define explicit schemas and constraints for request data, adopt coding standards that prohibit unguarded panics in request paths, and use automated analysis plus thorough reviews to enforce these policies.

Find out what's already
exploitable in your codebase.