Hijacking Sessions with IDOR and XSS— @bxmbn
An unauthenticated file upload endpoint accepted a tampered metadata parameter containing an XSS payload, which was stored and later rendered when viewing files by predictable reference numbers. An attacker could steal session cookies and take over accounts.
Picture a platform designed to handle sensitive documentation — think insurance claims or identity verification — turning into a goldmine for attackers. That’s what I stumbled into while exploring a file upload feature on an insurance-related portal.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the server failed to validate or sanitise the fileUidList parameter and did not require authentication on the upload endpoint, allowing stored XSS.
Impact
An attacker could steal session cookies and take over accounts, potentially mass account takeovers, because the upload endpoint required no authentication and reference numbers were predictable.
What the attacker needed
No account needed; victim visits view page; predictable reference numbers
How it was found
- Intercept the file upload request and note the fileUidList parameter.
- Replace the fileUidList value with an XSS payload and set a valid njfbRefNo.
- Send the request; the server responds 200 and stores the payload.
- Visit the view page using the same refNo to trigger the XSS.
- Use a payload that redirects the victim's browser to an attacker-controlled domain with their cookie appended.
- Check the attacker server logs to capture the SESSIONID cookie.
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 write-up has not been written yet. The Original tab links to the source.
The website let people upload files without checking if they were logged in. The upload form had a hidden field that the server trusted, so an attacker could put malicious JavaScript code there. When anyone later viewed that file, the code ran in their browser and could steal their login cookie, letting 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.