Skip to content
XSS Disclosed report Beginner CVE-2016-5682

Reflected XSS at ████████

The dochelper endpoint reflects the userId parameter without sanitisation, allowing an attacker to inject a script that executes in the victim's browser. An attacker could steal the victim's cookies and potentially take over their account.

ohzo Follow

Originally disclosed on HackerOne

  • Triaged in 4 days
  • Fixed in 27 days
  • Disclosed after 42 days

The domain █████████ have dochelper where the user id is submitted. We can submit the crafted XSS payload to pop the alert message by accesing the cookie.

POC URL:

https://████/dochelper?userId=</b><script>alert(document.cookie)</script><b><!-- 

█████

References

CVE-2016-5682 https://portswigger.net/web-security/cross-site-scripting https://www.bugbountyhunter.com/vulnerability/?type=xss

Impact

  • As an attacker, I can Steal the cookie of the User, by sending a crafted mail to them.
  • Victim's Account can be compramised
  • Impersonate or masquerade as the victim user.
  • Carry out any action that the user is able to perform.
  • Read any data that the user is able to access.
  • Capture the user's login credentials.
  • Perform virtual defacement of the web site.
  • Inject trojan functionality into the web site.

System Host(s)

█████████

Affected Product(s) and Version(s)

CVE Numbers

CVE-2016-5682

Steps to Reproduce

  1. Visit https://████████/dochelper?userId=
  2. Put a crafetd XSS payload to the userId parameter. (</b><script>alert(document.cookie)</script><b><!--)
  3. Open the link in the browser

Suggested Mitigation/Remediation Actions

  1. Filter input on arrival
  2. Encode data on output.

The original report as published on HackerOne, by ohzo. 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 reflects the userId parameter into the HTML response without output encoding or input validation.

Impact

An attacker could steal the victim's cookie by sending a crafted link, potentially compromising the victim's account and allowing impersonation or data access.

What the attacker needed

Victim clicks a crafted link

The fix

The application should filter input on arrival and encode data on output to prevent script injection.

How it was found

  1. Visit the dochelper URL with an empty userId parameter.
  2. Insert a crafted XSS payload into the userId parameter.
  3. Open the resulting link in a browser to trigger the script.

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 reflected cross-site scripting (XSS) bug means a website takes something you type in the address bar and puts it directly into the page without cleaning it. Here, the userId value is inserted into the HTML, so if it contains a script tag, the browser runs that script. An attacker can send a link to a victim; when the victim clicks it, the script runs and can read the victim's cookies, which may let the attacker log in as them.

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.