Cross-Site Scripting via 'currentImage' parameter
A reflected cross-site scripting flaw existed in the 'currentImage' GET parameter of a U.S. Navy website. An attacker could craft a link that runs script in a victim's browser, potentially stealing cookies and hijacking the session.
Originally disclosed on HackerOne
- Triaged in 6 hours
- Fixed in 28 days
- Disclosed after 8 months
Description: Hi, team! I discovered a Cross-Site Scripting (XSS) vulnerability on ████ , specifically through the GET method, via 'currentImage' parameter. This vulnerability allows an attacker to inject malicious scripts that could be executed, potentially leading to cookie theft, session hijacking, and other malicious actions.
PoC: ███
When you open the link, will apear one alert(1) pop-up to you. And after you close the pop-up, the "-alert(1)-" will disappear in the URL, but the XSS works.
It's a official website from U.S. Navy:
█████████
References
████
Impact
Exploitation of this vulnerability can lead to severe consequences, including but not limited: Session Hijacking: Attackers can steal cookies and impersonate legitimate users.
System Host(s)
███
Affected Product(s) and Version(s)
CVE Numbers
Steps to Reproduce
Open the link.
Suggested Mitigation/Remediation Actions
Apply context-dependent encoding and/or validation to user input rendered on a page.
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 'currentImage' parameter was reflected into the page without context-appropriate encoding or validation.
Impact
An attacker could steal cookies and impersonate legitimate users, leading to session hijacking.
What the attacker needed
Victim clicks a crafted link
How it was found
- Open the crafted link containing the payload in the 'currentImage' parameter.
- Observe the alert pop-up, then close it; the payload disappears from the URL but the script still runs.
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 puts something a user typed or clicked into a page without cleaning it first, so a bad actor can sneak in their own code. Here, a link contained a script in a part of the web address, and when someone opened it, the site ran that script as if it were its own. That could let an attacker read the victim's login cookies and act 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.