Protonmail XSS Stored
A stored cross-site scripting flaw existed in ProtonMail's web inbox: an attacker could send an email whose subject contained an image tag with an event handler, and when the victim opened the message and clicked reply, the script ran. The report also mentions a separate brute-force issue on a 10-digit password reset code, but gives no reproduction detail for it.
Published on medium.com
It’s my first blog post related to my bug bounty work so many people are sharing there findings so I’m also try to write something.
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 email subject was inserted into the reply view without proper output encoding, allowing markup and script to execute.
Impact
An attacker could run script in a victim's ProtonMail session after the victim opened the email and clicked reply, which could lead to actions being taken on the victim's behalf; the report does not demonstrate more than a prompt.
What the attacker needed
Attacker has a ProtonMail account; victim opens the email; victim clicks reply
The fix
The report says ProtonMail fixed the issue quickly.
How it was found
- From the attacker account, compose an email to a ProtonMail user with a subject containing an image tag with an event handler.
- Send the email to the victim.
- From the victim account, open the email message.
- Click reply on the message.
- The script executes.
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.
Cross-site scripting (XSS) is when a website displays text from an untrusted source without making it safe, so the browser treats part of that text as code and runs it. Here the email subject was shown in the reply view without being cleaned, so a crafted subject could run a small script in the victim's browser. The other issue is that a short numeric reset code could be guessed by trying many values.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.