Time-of-check Time-of-use (TOCTOU) Race Condition Affecting github.com/crossplane/crossplane-runtime/v2/pkg/xpkg package, versions >=2.3.0 <2.3.3


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

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-GITHUBCOMCROSSPLANECROSSPLANERUNTIMEV2PKGXPKG-19457663
  • published1 Sept 2026
  • disclosed27 Aug 2026
  • credittonghuaroot, bugbunny-research

Introduced: 27 Aug 2026

CVE NOT AVAILABLE CWE-367  (opens in a new tab)

How to fix?

Upgrade github.com/crossplane/crossplane-runtime/v2/pkg/xpkg to version 2.3.3 or higher.

Overview

Affected versions of this package are vulnerable to Time-of-check Time-of-use (TOCTOU) Race Condition via the CachedClient.Get flow in pkg/xpkg/client.go. An attacker controlling an OCI registry can serve one signed image to fetcher.Head and validator.Validate, then swap the tag to different content before fetcher.Fetch and package extraction, causing Crossplane to install an unsigned malicious package despite signature verification succeeding. This affects users who enable package signature verification in ImageConfig and install packages by tag from registries they do not control. The result is installation of attacker-chosen package content, which can break package integrity and let malicious package code or manifests run in the cluster.

Workarounds

  • Install packages by image digest rather than by tag reference; this prevents a registry from swapping tag content between signature verification and package fetch/install.

CVSS Base Scores

version 4.0
version 3.1