Time-of-check Time-of-use (TOCTOU) Race Condition Affecting github.com/moby/buildkit/executor/runcexecutor package, versions >=0.31.0 <0.33.1


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.1% (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-GITHUBCOMMOBYBUILDKITEXECUTORRUNCEXECUTOR-20826436
  • published11 Oct 2026
  • disclosed5 Oct 2026
  • creditStanPlatinum, Plucky923, SylvanJu

Introduced: 5 Oct 2026

NewCVE-2026-93315  (opens in a new tab)
CWE-367  (opens in a new tab)

How to fix?

Upgrade github.com/moby/buildkit/executor/runcexecutor to version 0.33.1 or higher.

Overview

Affected versions of this package are vulnerable to Time-of-check Time-of-use (TOCTOU) Race Condition in the containerd and runc executor run paths. An attacker can make a build succeed, block cleanup, or leave cleanup operating outside the intended rootfs by mutating the injected CA bundle during an exec step when proxy networking with CA injection is enabled. This can cause the build to complete even though the temporary proxy certificate was not removed, leaving the CA bundle in a bad state or causing cleanup to fail after the build step has run.

Workarounds

  • Avoid using build sources from untrusted locations; this reduces the chance a build step can mutate the injected proxy CA bundle before cleanup.
  • Only enable proxy networking for exec steps when necessary, via BuildKitd TOML config or Buildx Rego policy; this prevents exposure to the proxy CA cleanup disruption path.

CVSS Base Scores

version 4.0
version 3.1