NULL Pointer Dereference Affecting github.com/moby/buildkit/source/git package, versions >=0.26.0 <0.34.2


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.12% (2nd 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-GITHUBCOMMOBYBUILDKITSOURCEGIT-22480407
  • published12 Nov 2026
  • disclosed3 Nov 2026
  • creditUnknown

Introduced: 3 Nov 2026

NewCVE-2026-121522  (opens in a new tab)
CWE-476  (opens in a new tab)

How to fix?

Upgrade github.com/moby/buildkit/source/git to version 0.34.2 or higher.

Overview

Affected versions of this package are vulnerable to NULL Pointer Dereference via the resolveMetadata function in the Git source resolver. An attacker can crash buildkitd by supplying a build definition that resolves metadata for the same Git reference repeatedly: a failed or non-cacheable resolution stores a typed-nil *Metadata in the shared resolver cache, and a later resolution dereferences it. The cache is shared across jobs on a solve state, so one build can also cause another build to crash.

Workarounds

  • Avoid untrusted build definitions to prevent triggering the Git source resolver condition that can crash the daemon.

CVSS Base Scores

version 4.0
version 3.1