Image CDN keeps the C2PA chunk of a PNG it repacks, so the image no longer verifies

Open
#53,217 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
55/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
php
Domain
backend

Research direction

Start with Jetpack Photon’s image CDN handling and reproduce the reported behavior using the public PNG at testdata/c2pa_2x_openai.png and the commands in the issue. Compare the original and returned PNG chunks, then trace how the CDN processes PNG metadata. Done means the caBX chunk is removed when the image is repacked, while byte-for-byte passthrough remains unaffected.

Written by the indexing model from the issue text.

Description

Impacted plugin

Jetpack

Quick summary

I've been measuring what WordPress image tools do to files with C2PA Content Credentials, and I think I found a case where the image CDN makes a correct image look tampered with.

One PNG, signed by OpenAI, comes back from i0.wp.com with exactly the same pixels but with the image data repacked, and with its caBX chunk (the C2PA manifest) still in it. The signature covers the original bytes, so every C2PA verifier I tried now says the image was changed after signing.

The docs say strip=all is the default and strips all extraneous data. For four other signed PNGs that is what happens: the chunk is removed. I couldn't work out why this file is treated differently.

Steps to reproduce

The file is public, in richardwooding/c2pa (the same file is in provemark/tracefern-image-check as tests/Fixtures/openai-20260826-c2pa_2x.png):

U=raw.githubusercontent.com/richardwooding/c2pa/main/testdata/c2pa_2x_openai.png
curl -s -o original.png "https://$U"
curl -s -H 'Accept: image/png,*/*' -o cdn.png "https://i0.wp.com/$U"
c2patool original.png   # Valid
c2patool cdn.png        # Invalid, assertion.dataHash.mismatch

What I see (2026-10-06, around 13:00 UTC):

original.png  2,210,928 bytes  IHDR, caBX (23,597), 34 x IDAT, IEND   Valid
cdn.png       2,157,279 bytes  IHDR, caBX (23,597), 1 x IDAT, IEND    Invalid

All 1,448 x 1,086 pixels are the same, so it's a lossless repack. I get the same file from i0, i1 and i2, with and without ?ssl=1, and with a cache-busting query. c2patool 0.27.22, c2patool 0.28.1 and my own verifier (provemark/c2pa-verifier) agree on both files.

Running optipng -o2 on the original locally gives the same result (chunk kept, one IDAT, Invalid), so my guess is a lossless optimiser that keeps unknown ancillary chunks.

The other PNGs I tried lose the chunk instead: fixture-signed.png, c2pa-verifier-ai-parent-chain.png and amazon-20240925-titan-g1.png from the same tests/Fixtures folder, and sdk/tests/fixtures/exp-test1.png from contentauth/c2pa-rs. Resized requests, WebP and JPEG all lose it too. WebP and GIF requested in their own format come back unchanged and still verify.

Expected: the chunk is removed, as for the other PNGs, unless the file is passed through byte for byte.

Site owner impact

Fewer than 20% of the total website/platform users

Severity

Minor

What other impact(s) does this issue have?

No revenue impact

If a workaround is available, please outline it here.

Request the image resized or as WebP, or skip signed PNGs with the jetpack_photon_skip_image filter.

Happy to run more files or test a fix.

Dominant language
PHP
Stars
1.9k
Forks
913
Avg merge
1d 18h
Merged PRs (30d)
809

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Automattic/jetpack

All issues in Automattic/jetpack

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.