Crossplane's TOCTOU between cosign verification and image fetch in xpkg.CachedClient allows tag-based package install to bypass signature checkGHSA-mf7q-r4rv-jv94
GHSA-mf7q-r4rv-jv94 is a CWE-362 vulnerability in github.com/crossplane/crossplane-runtime/v2. A fix is available for github.com/crossplane/crossplane-runtime/v2 — see the affected versions and patch details below.
Exploitation Status
No confirmed exploitation observed yet
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for GHSA-mf7q-r4rv-jv94.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
Real-World Exposure
github.com/crossplane/crossplane-runtime/v2🐹github.com/crossplane/crossplane-runtime/v2Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
Description
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:
- Configure signature verification for packages,
- Install packages using tag references rather than digests, and
- 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.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | github.com/crossplane/crossplane-runtime/v2 | ≥ 2.4.0-rc.0&&< 2.4.0-rc.1 | 2.4.0-rc.1go get github.com/crossplane/crossplane-runtime/v2@v2.4.0-rc.1 |
| 🐹Go | github.com/crossplane/crossplane-runtime/v2 | ≥ 2.3.0&&< 2.3.3 | 2.3.3go get github.com/crossplane/crossplane-runtime/v2@v2.3.3 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/crossplane/crossplane-runtime/v2, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update github.com/crossplane/crossplane-runtime/v2 to 2.4.0-rc.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-mf7q-r4rv-jv94 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
Frequently Asked Questions
Is GHSA-mf7q-r4rv-jv94 in your dependencies?
Find it across Go, including transitive dependencies.