Skip to content
XSS Disclosed report Intermediate

Self stored Xss + Login Csrf

The username field allowed a stored cross-site scripting payload when the client-side length limit was bypassed, and a login CSRF flaw let an attacker force a victim into the attacker's account so the payload would execute. An attacker could run JavaScript in a victim's browser.

biest Follow

Originally disclosed on HackerOne

  • Disclosed after 5 months

Description: User can set username between 8-20 alphanumeric characters, but with the help of inspect element attacker can manipulate ██████= & can insert a xss payload resulting in self stored xss & with the help of login csrf attacker can force the victim into attacker's account causing successful execution of javascript.

█████████

Payload used = "><img src onerror=confirm(document.cookie)>

Impact

Able to execute javascript in victim's browser

System Host(s)

█████

Affected Product(s) and Version(s)

CVE Numbers

Steps to Reproduce

  1. Visit Sign in and sign in
  2. Click on Change username --> Open inspect element --> change max length of new username and confirm username to 100
  3. Now enter the payload in new username and confirm username field & click on submit --> Sign out
  4. Enter the credentials to sign in --> Intercept request using burp --> Action --> Engagement Tools --> Generate Csrf poc --> Copy html.
  5. Open notepad & paste --> save as .html file
  6. Open the html file in any browser to confirm the vulnerability.

Poc attached :-

███████

Suggested Mitigation/Remediation Actions

Sanitization of input must be done

The original report as published on HackerOne, by biest. 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 username was not sanitised or length-checked on the server, and the login form lacked CSRF protection.

Impact

An attacker could execute JavaScript in a victim's browser, but only after forcing the victim into the attacker's account via login CSRF.

What the attacker needed

Attacker can create an account; victim opens a crafted HTML file; victim is logged into attacker's account

How it was found

  1. Sign in to the site.
  2. Open the change-username page, use the browser inspector to raise the maximum length, and set both username fields to a long value.
  3. Enter the XSS payload in both username fields and submit, then sign out.
  4. Sign in again while intercepting the request, and use the proxy tool to generate a CSRF proof-of-concept HTML page.
  5. Save the generated HTML as a file and open it in a browser to confirm the vulnerability.

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 site let users pick a username but only checked its length in the browser, so an attacker could edit the page to send a longer name containing code. Separately, login CSRF let an attacker log a victim into the attacker's own account, where the malicious username ran as JavaScript.

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.