GHSA-mf7q-r4rv-jv94: Go/github.com/crossplane/crossplane-runtime/v2 vulnerability
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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
go/github.com/crossplane/crossplane-runtime/v2to a version that resolves this vulnerability.Fixed in 2.3.3 - Upgrade
Upgrade
go/github.com/crossplane/crossplane-runtime/v2to a version that resolves this vulnerability.Fixed in 2.4.0-rc.1 - Upgrade
Upgrade
crossplane/crossplaneto a version that resolves this vulnerability.Fixed in v2.3.3 - Upgrade
Upgrade
crossplane/crossplaneto a version that resolves this vulnerability.Fixed in v2.2.3 - Configuration
Configure Crossplane package signature verification via the ImageConfig mechanism so the package manager verifies packages before pulling and installing them (cosign-based verification as described).
Crossplane package manager (ImageConfig) ImageConfig (package signature verification) = Enable signature verification for packages - Compensating control
Install packages from registries Crossplane does not control (i.e., avoid using OCI registries you do not control) to reduce the risk that a registry could serve a correctly signed image for verification and then an unsigned image for installation when tag references are used.
- Compensating control
Install packages using tag references rather than digests, because installing by image digest rather than using tags avoids this issue (per the described mitigation).
Event History
Frequently Asked Questions
Who is exposed to this issue?
Only users who have configured package signature verification, install packages by tag rather than digest, and obtain packages from registries they do not control are affected. Deployments that do not meet all three conditions are not described as vulnerable.
What must an attacker be able to do?
An attacker needs control of, or the ability to maliciously influence, an OCI registry serving a tagged package. The registry must be able to return a correctly signed image during verification and then return different unsigned content when Crossplane fetches the package.
What can be done before an update is available?
Install packages using immutable image digests instead of tag references. This avoids separate tag resolution for signature verification and package retrieval.
How does the fix prevent the substitution?
The updated package manager resolves a tag reference once and uses the resulting digest for both signature verification and image fetching. This ensures the fetched package is the same content whose signature was verified.