Unsynchronized Access to Shared Data in a Multithreaded Context Affecting github.com/moby/buildkit/frontend/gateway/container package, versions <0.33.1


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.09% (1st 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 IDSNYK-GOLANG-GITHUBCOMMOBYBUILDKITFRONTENDGATEWAYCONTAINER-20826440
  • published11 Oct 2026
  • disclosed5 Oct 2026
  • credit2peopledesu

Introduced: 5 Oct 2026

NewCVE-2026-93319  (opens in a new tab)
CWE-567  (opens in a new tab)

How to fix?

Upgrade github.com/moby/buildkit/frontend/gateway/container to version 0.33.1 or higher.

Overview

Affected versions of this package are vulnerable to Unsynchronized Access to Shared Data in a Multithreaded Context through the container lifecycle handling in frontend/gateway/container/container.go and frontend/gateway/forwarder/forward.go. A malicious external BuildKit frontend can trigger a daemon panic by sending internal API requests that race container creation against discard/release operations. The race occurs when the gateway backend admits new containers while it is simultaneously cleaning up existing ones, allowing errgroup bookkeeping and container cleanup to run concurrently. An attacker can exploit this by driving repeated container-start and teardown requests through the internal gateway API, causing the BuildKit daemon to crash and interrupt builds.

Workarounds

  • Avoid using external BuildKit frontends from untrusted sources; this prevents a malicious frontend from driving the internal API sequence that can trigger the daemon panic.
  • Use Dockerfile builds instead of external BuildKit frontends when possible; the advisory states Dockerfile builds are unaffected, so this avoids the vulnerable gateway path.

CVSS Base Scores

version 4.0
version 3.1