[Update: Apple says it will fix the bug in a future update.]
A privacy bug reported by Brazilian site Mac Magazine allows someone to access hidden message notifications on a locked iPhone by asking Siri to read them …
As of iOS 11, you can set message notifications to be hidden on your Lock screen – you can see that a message has arrived, but its content is hidden. That setting is on by default on the iPhone X, where simply glancing at it will unlock the phone and allow the content to be displayed, while it can be set on other models.
However, a Mac Magazine reader discovered that Siri will read the content of most messages even though the content is hidden on the display.
The one exception is Apple’s own Messages app, where Siri will read them only if the phone is unlocked. But for other messaging apps like WhatsApp, Telegram and Skype, Siri will happily disclose the content of the messages to anyone who picks up the locked phone.
The site verified that the bug is in both iOS 11.2.6 and the beta of iOS 11.3. It has reported it to Apple.
To hide or show message content on the Lock screen, go into Settings > Notifications, choose the app, select Previews and then choose your option.