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.
- 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
- Visit https://████████/dochelper?userId=
- Put a crafetd XSS payload to the userId parameter. (</b><script>alert(document.cookie)</script><b><!--)
- Open the link in the browser
Suggested Mitigation/Remediation Actions
- Filter input on arrival
- Encode data on output.
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
- Visit the dochelper URL with an empty userId parameter.
- Insert a crafted XSS payload into the userId parameter.
- 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.