Skip to content

Backport xpkg verification fix to release-2.3 - #1038

Merged
adamwg merged 1 commit into
crossplane:release-2.3from
adamwg:awg/backport-ghsa
Jun 16, 2026
Merged

Backport xpkg verification fix to release-2.3#1038
adamwg merged 1 commit into
crossplane:release-2.3from
adamwg:awg/backport-ghsa

Conversation

@adamwg

@adamwg adamwg commented Jun 16, 2026

Copy link
Copy Markdown
Member

Description of your changes

Manual backport of the fix for GHSA-mf7q-r4rv-jv94 to the v2.3 release branch.

I have:

The CachedClient.Get path was:

  1. fetcher.Head(parsedResolvedRef)              -> resolves tag -> digest D
  2. validator.Validate(ref=D, vc)                -> cosign verifies D
  3. fetcher.Fetch(parsedResolvedRef)              -> remote.Image(tag)
  4. img.Manifest() (called by ExtractPackageYAML) -> GET tag again

Steps 1 and 4 hit the registry independently. A registry that serves
different content between the two requests can have step 2 verify a
benign signed digest while step 4 returns an unsigned malicious
manifest, and the consumer (Crossplane) installs the malicious package
despite the ImageConfig signature verification succeeding.

Pin the Fetch (and the validator call) to digestRef so the digest we
verify is the digest we pull.

Signed-off-by: tonghuaroot <tonghuaroot@gmail.com>
(cherry picked from commit 4250323)
@adamwg
adamwg requested a review from a team as a code owner June 16, 2026 19:14
@adamwg
adamwg requested review from jbw976 and removed request for a team June 16, 2026 19:14
@adamwg
adamwg merged commit bee99c6 into crossplane:release-2.3 Jun 16, 2026
10 checks passed
@adamwg
adamwg deleted the awg/backport-ghsa branch June 16, 2026 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants