An information security expert alias axi0mX has found a way to hack all iPhones with A5 to A11 processors from 2011 to 2017, according to ArsTechnica.
A tool called Checkm8 exploits vulnerabilities in Apple Boot Ram. This is the first code to start when the iPhone boots up and provide system-level access. Therefore, Apple can't fix this vulnerability without replacing physical components, which is why all of its old smartphones are prone to hack.
The user axi0mX wrote on Twitter about this hole that most generations of iPhone and iPad are vulnerable to: the iPhone 4S with A5 chip and iPhone 8 and iPhone X with A11 chip.