Symlink Attack Affecting github.com/moby/buildkit/vendor/github.com/tonistiigi/fsutil package, versions <0.34.1


Severity

Recommended
0.0
medium
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 IDSNYK-GOLANG-GITHUBCOMMOBYBUILDKITVENDORGITHUBCOMTONISTIIGIFSUTIL-22499834
  • published12 Nov 2026
  • disclosed3 Nov 2026
  • creditcarlospinto4p

Introduced: 3 Nov 2026

NewCVE-2026-121520  (opens in a new tab)
CWE-59  (opens in a new tab)
CWE-61  (opens in a new tab)

How to fix?

Upgrade github.com/moby/buildkit/vendor/github.com/tonistiigi/fsutil to version 0.34.1 or higher.

Overview

Affected versions of this package are vulnerable to Symlink Attack via the rewriteMetadata function in fsutil’s Unix file writer. A malicious client with access to BuildKit’s control API can send a build request that sets an xattr on a symlink, causing the xattr to be written to the symlink target outside the BuildKit state directory. This can include trusted. or security. xattrs that give a host program elevated privileges.

Workarounds

  • Do not accept builds from untrusted users on affected BuildKit services; this prevents malicious clients from submitting requests that write xattrs outside the BuildKit state directory.

CVSS Base Scores

version 4.0
version 3.1