Skip to content
XSS Disclosed report Intermediate

Html Injection and Possible XSS via MathML

The account title field allowed HTML injection, and in Firefox, MathML elements with an href attribute could execute JavaScript when clicked. An attacker could store a malicious link that, when clicked by the victim, would run JavaScript in the context of the application.

z41b1337_ Follow

Originally disclosed on HackerOne

Critical View original
  • Disclosed after 6 months

Hi, I would like to report HTML Injection and possible cross site scripting (XSS) vulnerability using the MathML on Firefox. Account title of field is vulnerable to Html Injection which can lead an attacker to store javascript using the MathML in Firefox. Modern Firefox versions allow usage of inline MathML. While other user agents don't support the href attribute for MathML elements (yet), Firefox does and thereby enables passive JavaScript execution. Note that supporting href for MathML elements is a feature - introduced with MathML 3. The same effect can be observed by using xlink:href. The statusline action further enables obfuscation of the actual link target - and in this example hides the JavaScript URI.

Step to reproduce 1- Login to your mopub account. 2- Go to account settings. 3- Click on Edit user settings. 4- Add this payload in Title field

<math href="javascript:alert(1)">CLICKME</math>

<math> <!-- up to FF 13 --> <maction actiontype="statusline#http://google.com" xlink:href="javascript:alert(2)">CLICKME</maction> <!-- FF 14+ -->

<maction actiontype="statusline" xlink:href="javascript:alert(3)">CLICKME<mtext>http://http://google.com</mtext></maction> </math>

5- Click on Submit Button. 6- HTML link will be stored in account Title. 7- Click on that html link and XSS will be executed in Firefox.

POC Please see the images in the attachment.

Impact

The vulnerability allow a malicious user to inject html tags and execute Javascript which could lead to steal user's session

The original report as published on HackerOne, by z41b1337_. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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

Impact

A malicious user could inject HTML and execute JavaScript, which could lead to stealing the user's session, though the exploit works only in Firefox and requires the victim to click the stored link.

What the attacker needed

A mopub account; victim uses Firefox; victim clicks the stored link

How it was found

  1. Log in to the mopub account.
  2. Go to account settings.
  3. Click on Edit user settings.
  4. Add the MathML payload in the Title field.
  5. Click on the Submit button.
  6. Click on the stored HTML link to trigger the XSS in Firefox.

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.

The title field on a user's account page did not properly clean up what users typed, so someone could insert HTML code. In Firefox, a special HTML-like language called MathML can include links that run JavaScript when clicked. This means an attacker could save a link that, when another user clicks it, runs harmful code in their browser.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

More from X / xAI

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.