Skip to content
XSS Write-up Intermediate

Dont Give Up On Xss Fun Firefox Xss

A reflected input was placed inside a hidden input field's value attribute, and the attacker could break out of the attribute but not use angle brackets. By injecting an accesskey and onclick handler, the attacker could trigger JavaScript when the victim pressed a specific key combination in Firefox.

Fırat Follow

Published on infosecwriteups.com

I got an invite from a private program on hackerone and started searching for some vulnerabilites. After a while of searching, i found an url that had some interesting parameters.

Fırat, on infosecwriteups.com

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 application reflected user input into an HTML attribute without proper encoding, allowing attribute injection, and the hidden input type prevented common event handlers from firing.

Impact

An attacker could execute arbitrary JavaScript in the victim's browser, but only in Firefox and only if the victim presses a specific key combination, requiring significant user interaction.

What the attacker needed

Victim uses Firefox; victim presses ALT+SHIFT+X; attacker can inject into hidden input value

How it was found

  1. Find a URL with a parameter that reflects inside a hidden input tag's value attribute.
  2. Inject a double quote to escape the value attribute.
  3. Attempt to close the input tag with angle brackets, but the app returns a 500 error.
  4. Inject an onfocus and autofocus attribute, but it does not fire because the input is hidden.
  5. Learn that in Firefox, hidden inputs can fire onclick via accesskey.
  6. Inject an accesskey and onclick handler; the victim must press ALT+SHIFT+X to trigger the alert.

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) lets an attacker run their own JavaScript in a victim's browser. Here the input was reflected inside a hidden form field, and the attacker found a way to add an event handler that runs when a key combination is pressed. This only worked in Firefox and required the victim to press keys.

What is XSS?

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

More by Fırat

View all

4 more disclosed reports, best first.

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.