You should update now — Apple has released OS 18.6.2 and iPadOS 18.6.2 to stop hackers from using malicious images to slip spyware onto iPhones and iPads.

The update went live on August 20 and it fixes a single but serious flaw in Apple’s ImageIO framework. Attackers could send a malicious image that corrupted memory and opened the door to device compromise.
In plain terms, someone could hack your iPhone just by getting it to process a picture. Apple says the bug was caused by an out-of-bounds write.