One of the earlier iPhone jailbreaks was a tiff image... complicated decompression/rendering algorithms leave room for implementation errors, which can be taken advantage of.
https://en.wikipedia.org/wiki/JailbreakMe#JailbreakMe_1.0_(i...
https://en.wikipedia.org/wiki/JailbreakMe#JailbreakMe_1.0_(i...
Then modders somehow managed to update the batteries' firmware (cf "Pandora battery") and use that. Sony couldn’t patch it, and it was basically game over for them until they released a new generation of hardware, with motherboards immune to the trick.
Fun times.