Skip to content
XSS Disclosed report Beginner

Reflected XSS on error message on Login Page

The login page reflected the value of an error parameter into the page without sanitisation, so an attacker could inject HTML and JavaScript. An attacker could run script in a victim's browser to steal cookies, impersonate the user, or redirect them.

kurogai Follow

Originally disclosed on HackerOne

  • Triaged in 3 hours
  • Fixed in 19 days
  • Disclosed after 49 days

Greetings!

I've found a reflected XSS on a login page on█████ . The vulnerable link is: https://███████/users/login?error={{media:0}}

█████████

Impact

An attacker can inject crafted javascript that can steal user cookies, impersionate, steal information, deface the website and redirect user to another domain

System Host(s)

██████████

Affected Product(s) and Version(s)

CVE Numbers

Steps to Reproduce

Access https://██████/users/login?error={{media:1}}

Suggested Mitigation/Remediation Actions

Sanitize the output with htmlspecialchars();

The original report as published on HackerOne, by kurogai. 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 error parameter was written into the HTML response without output encoding.

Impact

An attacker could run script in a victim's browser to steal cookies, impersonate the user, steal information, deface the site, or redirect the user to another domain.

What the attacker needed

Victim opens a crafted link

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.

A login page took a value from the web address and put it straight into the page. By putting HTML with a script handler in that value, an attacker can make the page run their code in the browser of anyone who opens the crafted link. That code can then act as the victim on the site.

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.