Skip to content
XSS Disclosed report Beginner

Reflected Xss in [██████]

A search page reflected an unsanitised single quote from the URL into the HTML, allowing an attacker to break out of an attribute and inject an event handler. An attacker could run arbitrary JavaScript in a victim's browser if the victim visited a crafted link.

medblgsec Follow

Originally disclosed on HackerOne

  • Triaged in 19 hours
  • Fixed in 3 months
  • Disclosed after 22 months

Description: Reflected XSS in █████████ due to unsanitized single quote '.

Impact

An attacker could execute arbitrary javascript, and perform malicious actions !

Step-by-step Reproduction Instructions

  1. Used payload: simo%27onfocus=%27confirm(document.domain)%27name=%27simo%27#simo
  2. Visit the url, the alert box should pop up !:

https://www.█████/gri/ziptool/search.aspx?a=1simo%27onfocus=%27confirm(document.domain)%27name=%27simo%27#simo

█████████

Suggested Mitigation/Remediation Actions

Sanitize single quote !

Impact

An attacker could execute arbitrary javascript in the client browser .

The original report as published on HackerOne, by medblgsec. 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

Root cause

Likely the search parameter was inserted into an HTML attribute without encoding the single quote, letting the attacker break out of the attribute context.

Impact

An attacker could execute arbitrary JavaScript in the client browser and perform malicious actions, though the report gives no further detail on what those actions are.

What the attacker needed

Victim clicks a crafted link

The fix

The single quote should be sanitised.

How it was found

  1. Craft a URL with a single quote and an onfocus handler in the search parameter.
  2. Visit the crafted URL in a browser.
  3. The injected handler fires and shows a dialog.

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.

When a website takes something from the address bar and puts it straight into the page without cleaning it, an attacker can slip in extra code. Here the single quote character let the attacker close an HTML attribute and add an onfocus handler, which runs JavaScript when the element is focused. The victim only has to open a link the attacker sends.

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 U.S. Dept Of Defense

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.