Your image redaction probably doesn't work the way you think
You've seen it happen — someone shares a screenshot with sensitive info "blacked out" using a drawing tool. A password, an API key, internal URLs, whatever. They've drawn a black rectangle over it, so it's fine. Except
You've seen it happen — someone shares a screenshot with sensitive info "blacked out" using a drawing tool. A password, an API key, internal URLs, whatever. They've drawn a black rectangle over it, so it's fine.
Except it's not.
The problem with black boxes
When you draw a black rectangle over text in most image editors, you're just adding a black layer on top of the existing pixels. The original data is still there in the image file.
With some tools and formats, you can actually select that black rectangle, move it aside, and see what was underneath. Or export the image layers separately. Or just look at the raw pixel data.
Even when the pixels are actually overwritten, you've got other issues:
- Metadata — EXIF data, creation timestamps, GPS coordinates if it was a phone photo, application-specific metadata
- Thumbnails — some formats embed a lower-resolution preview that might not get updated
- Alpha channels — in formats like WebP or PNG, the alpha channel can contain data that's not visible but still present
- Undo history — some formats or tools preserve edit history
This matters more than you think
In DevOps, we share screenshots all the time:
- Dashboard screenshots in incident reports
- Log output in Slack or email
- Configuration screens in documentation
- Error messages in support tickets
If you're "redacting" by drawing black boxes in Preview.app, Paint, or most basic image editors, you're probably not actually redacting.
How to actually redact
Crop it out. The simplest approach — if the sensitive info is at the edge, just crop the image to exclude it entirely. The pixels are gone.
Use proper redaction tools. Tools like Adobe Acrobat's redaction feature (for PDFs), or dedicated redaction software actually remove the underlying data. They don't just cover it up.
Recreate the screenshot. If you need to show the structure but hide values, use dummy data. Take a new screenshot with fake credentials, fake URLs, whatever. Then there's no original data to leak.
Export as flat format. If you must redact in an image editor, flatten all layers, export as JPEG (which doesn't support alpha channels or layers), and verify by opening the exported file and checking there are no hidden layers.
The WebP specific gotcha
WebP is increasingly common — it's the default format for screenshots on macOS now, it's used extensively on the web, lots of tools output it.
WebP supports:
- Lossless compression (original pixel data is preserved exactly)
- Alpha channels (can contain hidden data)
- Metadata chunks (EXIF, XMP, ICC profiles)
- Animation frames (earlier frames might contain "deleted" data)
If you're redacting a WebP screenshot by drawing over it, and the tool saves it as lossless WebP, you might think you're safe. But the alpha channel or metadata might still contain traces of what was there.
Quick test
Take a screenshot with sensitive info. Draw a black box over it. Save it.
Now open it in an image editor that shows layers or channels. Check:
- Are there multiple layers?
- Is there an alpha channel with unexpected data?
- What metadata is embedded?
- If it's WebP, is it lossless or lossy?
You might be surprised what's still there.
The practical fix
For most cases: just crop it out or use dummy data.
If you need to redact multiple things in a complex screenshot, use a tool designed for redaction, not a basic image editor.
And if you're building internal tools that handle screenshots or logs, consider adding a "redact mode" that actually removes data rather than covering it up.
The black box redaction is security theater. It feels safe, but it's not.
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.