Show form reportValidity validationMessage on any website
A form validation popup could be made to persist on screen after its tab was closed, so it appeared over a different site. An attacker could use this to overlay a fake message on a trusted site and trick a user into pressing Enter, which would trigger an action such as liking or retweeting a tweet.
Originally disclosed on Mozilla
- Fixed in 7 days
- Paid in 12 days
- Disclosed after 7 days
Created attachment 9223917 spoof.bundle.html
After set reportValidity() as canvas.toBlob callback and set contenteditable to true, the reportValidity validationMessage will persist even the tab was closed. As the validationMessage is persist on the screen, after the tab was closed the validationMessage still show to previous active tab.
In this report I demonstrate I able to spoof validationMessage on Twitter then overlap the Twitter button intent (which press enter also works) to retweet/like the tweet.
As the validationMessage is showed on secure domain, user will likely trust the message is from the website, and the validationMessage will overlap Twitter button intent message so user won't notice that press enter will retweet/like the tweet.
Mozregression show it is regression of Bug 1684792, open form validation popup anchored at screen coordinate as datetime picker and select do so that it is positioned correctly in out of process iframes
Affected version:
- Firefox Nightly 90.0a1 (2021-05-27) (64-bit)
- Firefox Release 88.0.1 (64-bit)
Unaffected version:
- Firefox 78.10.1esr (64-bit)
Steps to Reproduce:
- Visit attached spoof.bundle.html
- Click "Spoof validationMessage" button
- Validation message appear on Twitter website
- If you're logged in then press Enter to like the tweet
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the form validation popup was anchored to screen coordinates and not torn down when its originating tab closed, so it outlived the page that created it.
Impact
A user could be tricked into pressing Enter and unintentionally liking or retweeting a tweet, because the fake popup overlapped the real button intent; the report demonstrates this on Twitter only.
What the attacker needed
Firefox 88.0.1 or Nightly 90.0a1; victim logged in to Twitter; victim presses Enter
How it was found
- Open the attached HTML file.
- Click the button that spoofs the validation message.
- Observe the validation message appearing over the Twitter website.
- If logged in, press Enter to like the tweet.
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 report has not been written yet. The Original tab links to the source.
Browsers show small popups to tell you when a form field is invalid. This report found that such a popup could be made to stay on screen even after the page that created it was closed, so it floated over whatever site you looked at next. Because the popup looked like it came from the trusted site, a user could be tricked into pressing Enter and performing an action they did not intend.
What is UI spoofing?
The interface lies to the user: a framed page catches their clicks, or a browser shows the wrong address or a fake prompt. Paid when it leads to a sensitive action or convincing phishing.