Skip to content
XSS Write-up Beginner

How I Turned a 403 Forbidden Into a Goldmine

A hidden password reset endpoint was found via fuzzing after a 403 page, and a hidden form parameter reflected an XSS payload without encoding. An attacker could execute JavaScript in a victim's browser, potentially stealing session cookies.

infosecwriteups.com

Published on infosecwriteups.com

Free Link🎈

Iski, on infosecwriteups.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 application reflected user input from a hidden form field into the response without proper encoding or sanitisation.

Impact

An attacker could execute JavaScript in a victim's browser, potentially stealing session cookies if an admin visited the page while logged in.

What the attacker needed

Victim visits the crafted page; victim is logged in

The fix

The application should properly encode or sanitise all user input before reflecting it in responses.

How it was found

  1. Send a request to a forbidden path and receive a 403 response.
  2. Use a fuzzing tool to discover a hidden password reset endpoint that returns 200 OK.
  3. Intercept the password reset form submission and observe hidden parameters.
  4. Inject a script payload into one hidden parameter and submit the form.
  5. Observe the script executing in the browser.

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.

A website can hide pages that are not linked but still reachable. Here, a password reset page was found by guessing paths. One of its hidden form fields echoed back whatever was typed into it, so a script could be injected and run in another user's browser.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

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.