# iOS app crashed by specially crafted direct message reactions

A NUL byte in a DM reaction_key crashes the X iOS app persistently, letting any sender render the victim's app unusable until they delete the message via web.

- Payout: $560
- Severity: medium
- Program: X / xAI
- Found by: alexiaya
- Disclosed: 2020-02-21
- Write-up quality: 6/10
- Original: https://hackerone.com/reports/784676
- Library page: https://bugbountylibrary.com/r/h1%3A784676
- Tags: area:mobile domain:api domain:mobile impact:dos kind:bounty platform:hackerone sev:medium tech:ios technique:fuzzing vuln:dos vuln:misconfiguration

**Target:** X/Twitter iOS app (com.atebits.Tweetie2) DM reaction rendering and message preview
**Root cause:** The DM reaction API accepts arbitrary bytes in reaction_key without sanitizing control characters (\r, \n, \0); the iOS client renders the raw reaction text in the DM list preview and crashes on NUL.
**Steps:**
1. Open a DM conversation with the victim (or self).
2. POST to `https://api.twitter.com/1.1/dm/reaction/new.json` with valid `conversation_id` and `dm_id`, and `reaction_key` set to a raw `\0` NUL byte.
3. Observe the iOS app crash on receipt and on every subsequent reopen.
**How found:** Noticed reaction text is echoed unsanitized in the DM preview; tested control characters (\r, \n) then a NUL byte, which crashed the client.
**Exploitation:** Attacker sends a DM and posts a reaction with a NUL byte in reaction_key; the victim's iOS client crashes when rendering the DM list preview and keeps crashing on relaunch, requiring web login to delete the message/conversation.
**Insight:** Reaction/emoji fields echoed into list previews are a good spot to fuzz control bytes (\0, \r, \n) — a single unvalidated byte in a server-accepted field can cause persistent client-side DoS.

## Proof of concept (copied exactly from the original report)

**Request with NUL byte reaction_key crashing iOS app**

```
Make a request to https://api.twitter.com/1.1/dm/reaction/new.json with an appropriate `conversation_id` and `dm_id` parameter, and `reaction_key` set to `\0` (an actual NUL byte).
```

