Skip to content
XSS Disclosed report Beginner CVE-2021-41878

XSS on ( █████████.gov ) Via URL path

A reflected cross-site scripting vulnerability was found in a URL path parameter of a government website. An attacker could craft a malicious link that executes script in a victim's browser, potentially stealing cookies and leading to account takeover.

notajax Follow

Originally disclosed on HackerOne

  • Triaged in 34 hours
  • Fixed in 9 days
  • Disclosed after 20 days

Hi team, I was able to execute XSS on ███████.gov

Steps to produce - 1 -Turn on the burp intercepter 2- Go to https://██████.gov/xapi/statements?file"><script>alert(document.domain)</script> 3- In Intercepter add the following Headers

Authorization: Basic eGFwaS10b29sczp4YXBpLXRvb2xz X-Experience-Api-Version: 1.0.1

4- when you send this GET request you will receive a response with XSS payload executed.

Impact

An attacker can send the malicious link to victims and steals victims' cookie leading to account takeover.

System Host(s)

www.███.gov

Affected Product(s) and Version(s)

CVE Numbers

CVE-2021-41878

Steps to Reproduce

I have attached the Video POC, please check it out.

Suggested Mitigation/Remediation Actions

sanitize the inputs in the URL

The original report as published on HackerOne, by notajax. 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 application failed to sanitise or encode user-controlled input from the URL path before reflecting it in the response.

Impact

An attacker could send a malicious link to victims and steal their cookies, potentially leading to account takeover.

What the attacker needed

Victim clicks a crafted link; request includes specific headers

How it was found

  1. Turn on Burp Suite's interceptor.
  2. Visit the crafted URL containing the XSS payload in the path.
  3. Add the required Authorization and X-Experience-Api-Version headers in the intercepted request.
  4. Send the GET request and observe the XSS payload executing in the response.

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.

Cross-site scripting (XSS) is when a website takes untrusted input, like part of a URL, and puts it into a page without cleaning it, so an attacker's script runs in the victim's browser. Here, the URL path contained a script tag that the site reflected back, letting an attacker run code in a victim's session.

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.