Skip to content
Mobile Write-up Advanced

The plan

A sandbox escape zero-day in iOS 13.4.1 allowed an app signed with malicious entitlements to read the SMS database outside its container. An attacker who got a victim to install such an app could exfiltrate the entire iMessage history to a remote server.

wojciechregula.blog

Published on wojciechregula.blog

This is a special post because I fully based on another researcher, s1guza’s 0day. All of this story began from the following tweet:

Wojciech Reguła, on wojciechregula.blog

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely a flaw in how iOS validated code-signing entitlements, letting an app claim private entitlements that grant access to the Messages storage outside its sandbox.

Impact

An installed malicious app could read and exfiltrate the full SMS/iMessage database on iOS 13.4.1; the bug was already patched in the 13.5 beta.

What the attacker needed

Victim installs a maliciously signed app; iOS 13.4.1 or earlier

The fix

Apple fixed the underlying bug in iOS 13.5, and users should update and avoid installing suspicious apps.

How it was found

  1. Build a simple app that reads the SMS database file and posts it to a server
  2. Sign the app with entitlements that grant access to Messages storage
  3. Install the app on the device
  4. Start a receiving server
  5. Enter the server URL in the app and press the button to send the database

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

Every app on an iPhone runs in its own locked box called a sandbox, so it cannot read other apps' data. This bug let a specially signed app break out of that box and read the file where text messages are stored. The attacker then sends that file to their own server, so they get all the victim's messages.

What is Mobile?

Flaws specific to Android and iOS apps: exported components, deep links, WebViews and data left on the device.

Similar reports

View all

Same bug class and techniques, clearest first.

Mobile app vulnerabilities

The lesson behind this report.

Flaws specific to Android and iOS apps: exported components, deep links, WebViews and data left on the device.