One postMessage Was Enough to Break a Trust Boundary (CSRF)
The application's postMessage handler did not validate the sender's origin before acting on message properties, allowing an attacker-controlled website to trigger trusted client-side functionality. This could enable client-side abuse involving promotional workflows or other trusted UI interactions.
Most bug bounty discoveries don’t begin with an advanced exploit. No SQL Injection.
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
The receiving code did not verify the origin of incoming postMessage events before processing them.
Impact
An untrusted origin could trigger trusted client-side functionality, potentially increasing the attack surface for client-side abuse involving promotional workflows or other trusted UI interactions.
What the attacker needed
Victim visits attacker-controlled website; victim has the application open or opens it via popup
The fix
The application should validate the sender's origin before processing any message and avoid using '*' as the targetOrigin.
How it was found
- Create an HTML page that opens the legitimate application in a popup.
- Wait for the client-side components to initialize.
- Send a crafted postMessage payload to the popup.
- Observe that the application accepts the message and reaches campaign-related client-side logic.
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.
Websites can send messages to each other using a browser feature called postMessage. The receiving site should check who sent the message, but here it did not. So a malicious site could send a message that the trusted site would act on, potentially causing unwanted actions.
What is CSRF?
Another site makes a signed-in user's browser perform an action they did not intend.