I Put an XSS Payload as My Contact Name, and a Bank Paid the Pric
A banking app rendered contact names inside a WebView without sanitisation, so a contact name containing an XSS payload executed when the victim opened the transfer/favourite recipient feature. This allowed the attacker to exfiltrate sensitive data from localStorage, including session tokens and account numbers.
Published on medium.com
I changed my phone contact name to an XSS payload after reading an article from Om YoKo Kho about XSS via Wi-Fi SSID names. Out of curiosity, I tested it against several apps, including a banking app in Indonesia, and the payload triggered inside one of its features.
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 the app failed to sanitise or encode contact names before rendering them in a WebView, allowing script injection.
Impact
An attacker could steal session tokens, account numbers, and other sensitive data from localStorage, potentially leading to account takeover.
What the attacker needed
Victim has the banking app installed; attacker can plant a contact on victim's phone; victim opens the transfer/favourite recipient feature
The fix
The vulnerability was fixed silently by the bank, as the author later found the bug was gone.
How it was found
- Create a contact with an XSS payload as the name.
- Open the banking app and navigate to the transfer feature that reads contacts.
- The app renders the contact name in a WebView, executing the payload.
- The payload exfiltrates data from localStorage to an attacker server.
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.
When an app shows text from an untrusted source (like a contact name) without cleaning it, hidden code can run. Here, a contact name containing a script caused the banking app to run that script, which then stole data stored in the app.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.