CVE-2026-121542 PUBLISHED

Bake filesystem path entitlements approval can be skipped for path using basename prefix

Assigner: Docker
Reserved: 03.11.2026 Published: 03.11.2026 Updated: 03.11.2026

In Docker Buildx versions v0.19.0 through v0.38.0, an untrusted Bake definition may expose files accessible to the Buildx client without the expected fs.read approval. Under certain conditions, paths under the same parent directory as the current working directory whose names use the working directory's basename as a prefix can skip the filesystem entitlement check. Exploitation requires specific matching filenames next to the current project directory. Users who run untrusted Bake definitions may be affected. The issue is fixed in v0.38.1.

Metrics

CVSS Vector: CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:A/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N
CVSS Score: 1.8

Limited-disclosure scenario: a victim runs an untrusted Bake definition and client-readable files with matching basename prefixes exist next to the project directory. This score assumes disclosure is limited to noncritical information; that limitation has not been established for all affected deployments. It does not cover exposure of credentials or other critical information, or filesystem-write impacts described in the broader report.

Product Status

Vendor Docker
Product Docker Buildx
Versions Default: unaffected
  • affected from 0.19.0 to 0.38.1 (excl.)

Workarounds

Run only trusted Bake definitions until upgrading. Check that Bake definitions do not contain suspicious paths outside trusted directories. The issue requires specific matching filenames next to the current project directory.

Solutions

Upgrade Docker Buildx to v0.38.1 or later.

Credits

  • hCaptcha security team finder

References

Problem Types

  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') CWE