Incorrect Authorization Affecting github.com/docker/buildx/bake package, versions >=0.19.0 <0.38.2


Severity

Recommended
0.0
low
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.14% (4th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Incorrect Authorization vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-GOLANG-GITHUBCOMDOCKERBUILDXBAKE-22498303
  • published12 Nov 2026
  • disclosed3 Nov 2026
  • credithCaptcha Security Team

Introduced: 3 Nov 2026

NewCVE-2026-121542  (opens in a new tab)
CWE-22  (opens in a new tab)
CWE-863  (opens in a new tab)

How to fix?

Upgrade github.com/docker/buildx/bake to version 0.38.2 or higher.

Overview

Affected versions of this package are vulnerable to Incorrect Authorization via the isParentOrEqualPath function in Bake filesystem entitlement validation. An attacker can supply an untrusted Bake definition that references a sibling path whose name shares the approved directory’s prefix, causing Bake to treat that path as approved and expose files accessible to the Buildx client without the expected fs.read approval. The matching sibling path must exist next to the project directory, and the user must run the definition.

Notes

  • At the impact step, exposure is limited to files the Buildx client can access; the prefix bypass does not grant access to otherwise inaccessible files.

Workarounds

  • Run only trusted Bake definitions to prevent untrusted definitions from exploiting the filesystem entitlement bypass.
  • Check Bake definitions for suspicious paths outside trusted directories, and do not build definitions that reference them; this limits access to files outside those directories.

CVSS Base Scores

version 4.0
version 3.1