News for hackers. Stuff that matters.
Re:Exploiting ACropalypse: Recovering Truncated PNGs by Retr0id on Saturday March 18, 2023 @04:41PM (#35212903)
A naive approach to stripping EXIF from a PNG would be to parse up to the start of the first eXIf chunk, discard the contents of that chunk, and then include the rest of the file verbatim without actually parsing anything.

But yes, a more sensibly coded EXIF stripper would deserialise and reserialise. Unfortunately I am no longer able to assume that programmers will behave sensibly.

Re:Exploiting ACropalypse: Recovering Truncated PNGs by ericpauley on Sunday March 19, 2023 @01:06AM (#35216216)
Does anyone take this “naive” approach in practice? Any good image sanitization I’ve seen is equivalent to taking a screenshot of the image, re-serializing pixel contents but ignoring anything else. Any reputable service (e.g., Gmail) must take this approach to prevent proliferation of possible image-based malware.

As you noted above Discord doesn’t sanitize PNGs. This exposes a failing on their end as well, as large services taking input from users should sanitize images to protect both senders and recipients.