Vulnerabilities in pkg:golang/github.com/crossplane/crossplane-runtime/v2

PACKAGE
Advisory Summary

GHSA-mf7q-r4rv-jv94 is a HIGH crossplane's toctou between cosign verification vulnerability (CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition) affecting Github.com/crossplane/crossplane runtime/v2 libraries in the Go ecosystem. The issue involves crossplane's toctou between cosign verification and image fetch in xpkg.cachedclient allows tag-based package install to bypass signature check. Remediation is available by upgrading affected packages to version 2.4.0-rc.1, 2.3.3.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:golang/github.com/crossplane/crossplane-runtime/v2

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:golang/github.com/crossplane/crossplane-runtime/v2. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-mf7q-r4rv-jv94 - HIGH Crossplane's TOCTOU between cosign verification and image fetch in xpkg.CachedClient allows tag-based package install to bypass signature check

GHSA-mf7q-r4rv-jv94 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-mf7q-r4rv-jv94
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition
Affected Product Github.com/crossplane/crossplane runtime/v2
Package Ecosystem Go
Published Date
Last Updated

How to Fix GHSA-mf7q-r4rv-jv94

To remediate this vulnerability, upgrade all affected Github.com/crossplane/crossplane runtime/v2 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/crossplane/crossplane-runtime/v2 fixed: 2.4.0-rc.1
Upgrade github.com/crossplane/crossplane-runtime/v2 to 2.4.0-rc.1
github.com/crossplane/crossplane-runtime/v2 fixed: 2.3.3
Upgrade github.com/crossplane/crossplane-runtime/v2 to 2.3.3
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/crossplane/crossplane-runtime/v2

How to Check if You Are Affected

To determine whether your application is affected by GHSA-mf7q-r4rv-jv94, inspect your project dependencies for Github.com/crossplane/crossplane runtime/v2:

inspect dependencies for github.com/crossplane/crossplane-runtime/v2

Analyze the terminal output to locate any version of Github.com/crossplane/crossplane runtime/v2 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.4.0-rc.1), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition, where the product checks the state of a resource before using that resource, but the resource's state can change between the check and the use in a way that invalidates the results of the check. In Github.com/crossplane/crossplane runtime/v2, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Summary Crossplane allows package signature verification to be configured via the `ImageConfig` mechanism. When enabled, the package manager uses cosign to verify that packages are correctly signed before pulling and installing them. When a package is installed using a tag reference (e.g., a semantic version), a malicious OCI registry could serve a correctly signed image for verification, then subsequently serve an unsigned image for installation. This is possible because Crossplane resolves the tag reference separately for each step. This vulnerability is relevant only for users who do all three of the following: 1. Configure signature verification for packages, 2. Install packages using tag references rather than digests, and 3. Install packages from registries they do not control. ## Mitigation Installing packages by image digest rather than using tags avoids this issue. ## Fix The package manager has been updated to resolve tag references once and use the resulting digest for both signature verification and image fetching. This ensures that Crossplane pulls the same content that had its signature verified. The fix has been applied to Crossplane's `main` branch and backported to the v2.3 and v2.2 release branches; it will be released in v2.3.3 and v2.2.3. ## Credits This issue was reported, independently, by @bugbunny-research and @tonghuaroot.

GHSA-mf7q-r4rv-jv94 Affected Github.com/crossplane/crossplane runtime/v2 Versions

2 component(s)
Fixed Versions:
2.4.0-rc.12.3.3
Product / Package Ecosystem Affected Versions Fixed Version
github.com/crossplane/crossplane-runtime/v2
Go
≥ 2.4.0-rc.0
< 2.4.0-rc.1
All 1 versions
2.4.0-rc.0
2.4.0-rc.1
github.com/crossplane/crossplane-runtime/v2
Go
≥ 2.3.0
< 2.3.3
2.3.3

References

Frequently Asked Questions

What is GHSA-mf7q-r4rv-jv94?
GHSA-mf7q-r4rv-jv94 is a security vulnerability in Github.com/crossplane/crossplane runtime/v2 involving Crossplane's TOCTOU between cosign verification and image fetch in xpkg.CachedClient allows tag-based package install to bypass signature check under CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition.
Which Github.com/crossplane/crossplane runtime/v2 versions are affected?
Affected versions include releases prior to 2.4.0-rc.1, 2.3.3 across affected packages: github.com/crossplane/crossplane-runtime/v2.
What version fixes GHSA-mf7q-r4rv-jv94?
Upgrading to 2.4.0-rc.1, 2.3.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/crossplane/crossplane-runtime/v2 affected?
Yes, github.com/crossplane/crossplane-runtime/v2 is affected in releases prior to 2.4.0-rc.1, 2.3.3. Upgrade your dependency to 2.4.0-rc.1, 2.3.3 or later.
What CWE is associated with GHSA-mf7q-r4rv-jv94?
GHSA-mf7q-r4rv-jv94 is classified under CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition (The product checks the state of a resource before using that resource, but the resource's state can change between the check and the use in a way that invalidates the results of the check.).
How can I check Go dependencies for GHSA-mf7q-r4rv-jv94?
Run the dependency tree command: 'inspect dependencies for github.com/crossplane/crossplane-runtime/v2'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-mf7q-r4rv-jv94",
  "modified" : "2026-08-27T17:25:25Z",
  "published" : "2026-08-27T17:25:25Z",
  "aliases" : [ ],
  "summary" : "Crossplane's TOCTOU between cosign verification and image fetch in xpkg.CachedClient allows tag-based package install to bypass signature check",
  "details" : "## Summary\n\nCrossplane allows package signature verification to be configured via the `ImageConfig` mechanism. When enabled, the package manager uses cosign to verify that packages are correctly signed before pulling and installing them.\n\nWhen a package is installed using a tag reference (e.g., a semantic version), a malicious OCI registry could serve a correctly signed image for verification, then subsequently serve an unsigned image for installation. This is possible because Crossplane resolves the tag reference separately for each step.\n\nThis vulnerability is relevant only for users who do all three of the following:\n\n1. Configure signature verification for packages,\n2. Install packages using tag references rather than digests, and\n3. Install packages from registries they do not control.\n\n## Mitigation\n\nInstalling packages by image digest rather than using tags avoids this issue.\n\n## Fix\n\nThe package manager has been updated to resolve tag references once and use the resulting digest for both signature verification and image fetching. This ensures that Crossplane pulls the same content that had its signature verified. The fix has been applied to Crossplane's `main` branch and backported to the v2.3 and v2.2 release branches; it will be released in v2.3.3 and v2.2.3.\n\n## Credits\n\nThis issue was reported, independently, by @bugbunny-research and @tonghuaroot.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/crossplane/crossplane-runtime/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.4.0-rc.0"
      }, {
        "fixed" : "2.4.0-rc.1"
      } ]
    } ],
    "versions" : [ "2.4.0-rc.0" ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/crossplane/crossplane-runtime/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.3.0"
      }, {
        "fixed" : "2.3.3"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.3.2"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/crossplane/crossplane-runtime/security/advisories/GHSA-mf7q-r4rv-jv94"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/crossplane/crossplane-runtime"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-345", "CWE-367" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-08-27T17:25:25Z",
    "nvd_published_at" : null
  }
}