Skip to content
XSS Write-up Beginner

From Random Browsing to Finding Stored XSS + IDOR

A career page allowed users to upload a PDF resume that was served back in the browser, and a PDF containing an XSS payload executed when viewed, giving stored XSS. The resume URL contained a numeric user identifier that could be changed to access other users' uploaded resumes without any authorisation check, an IDOR.

dhxrxx Follow

Published on medium.com

It’s been a while since I wrote anything here. I hope all my fellow hunters and infosec friends are doing well.

Dharanis, on medium.com

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 uploaded PDF was served inline without sanitising or forcing download, and the file-serving endpoint used a guessable numeric user identifier without checking that the requester owned that file.

Impact

An attacker could upload a malicious PDF that executes script when viewed by others, and could enumerate and download other users' private resumes containing sensitive personal data.

What the attacker needed

Ability to upload a CV on the career page; victim opens the uploaded PDF in a browser; guessable numeric file identifier

How it was found

  1. Create a PDF containing an XSS payload and upload it as a CV on the career page.
  2. Open the uploaded resume using the view option in the browser and observe the payload executing.
  3. Note the numeric identifier in the resume URL and change it to a nearby value.
  4. Fuzz the numeric range with an intercepting proxy and look for successful responses.
  5. Open a successful response and confirm it is another user's resume.

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 site let people upload a CV as a PDF and then showed that PDF in the browser. The uploaded file could contain a small script, and the browser ran it when the file was opened, which is called stored cross-site scripting. Separately, the link to each CV contained a number that looked like a user ID, and changing that number let anyone download other people's CVs without logging in as them, which is called an insecure direct object reference.

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 dhxrxx

View all

2 more disclosed reports, best first.

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.