Skip to content
XSS Disclosed report Beginner

Reflected XSS on ███

A non-existent path on the site is reflected unsanitised in the 404 error message, allowing an attacker to inject an SVG element with an onload handler that executes JavaScript in the victim's browser.

pdbx Follow

Originally disclosed on HackerOne

  • Triaged in 48 hours
  • Fixed in 3 months
  • Disclosed after 4 months

Summary

Reflected XSS on █████████ for invalid paths.

Description

Requesting a non-existent path on █████, such as https://██████████/chron0x the site responds with No jsonpage404 is /chron0x versus /chron0x./chron0x does not exist. As it can be seen, the path is reflected. This can be exploited with an XSS.

Note: I am reporting this here, since the foorter of ███ states Official ███ Website. The ████████ is an Equal Opportunity Employer., and the █████ underlies the DoD. If this should not belong to the DoD scope I would kindly ask to self close this issue.

Step-by-step Reproduction Instructions

  1. Visit http://█████████/<svg onload=alert("chron0x")>

Mitigation/Remediation Actions

Sanitize the path input or switch to a generic error message.

Impact

Javascript can be executed to steal data, etc.

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

The application reflects the requested path into the 404 error page without sanitising or encoding it.

Impact

JavaScript can be executed in the victim's browser to steal data, though the report gives no further detail on what data or under what conditions.

What the attacker needed

Victim clicks a crafted link

The fix

The path input should be sanitised or the site should switch to a generic error message.

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 you visit a web address that does not exist, the site shows an error message that includes the path you typed. Because the site does not clean that path before putting it on the page, an attacker can put code in the path instead of a normal name. When a victim opens the crafted link, the code runs in their browser as if it came from 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 by pdbx

View all

6 more disclosed reports, best first.

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.