NewsCrawler.org

Redacting lossy WebP images can leak the hidden content

Mock case file document with a black redaction box covering one line of text
Amplified difference between the redacted lossy WebP images, showing changes across the whole image including the untouched heading and footer text
Image: octet-stream.net

Thomas Karpiniec describes a risk when redacting images that were saved in a lossy[1] format. Lossy compression can spread the pixels of the redacted area across the image. For JPEG, the effect stays within 8x8 pixel blocks, so keeping an 8px buffer around the redacted content is enough.

With WebP, the author found no such limit. In a synthetic test, a JPEG at quality 50 with the word 'YES' was covered by a black box that extended only 2px past the letters and saved as PNG. The same process on an image with 'NO' left a different ring of artifacts outside the box, so the hidden word could in principle be inferred. The same test with lossy WebP (VP8[2]) showed differences across the entire image.

The author says there is no obvious way to apply a redaction to lossy WebP that prevents this leakage, and he notes that image forensics is not his field. He advises against using any lossy WebP source material when you need to redact and share an image.

Read the original octet-stream.netDiscussion

Discussion

Commenters suggested mitigations: adding noise after the fact, or reducing the image to a few colours in a lossless format such as PNG before redacting, and then downscaling it. One commenter explained that WebP computes statistics across the whole image and can reuse pixels from neighbouring blocks, which would explain the spread. Another asked whether the problem also applies to AVIF images.

Sources

Published: First seen: Читать по-русски

Open as a page