Skip to content
XSS Write-up Beginner

Reflected XSS di Halaman Login Pemerintah Kabupaten [REDACTED]

The login page reflected the URL parameter 'redirect' into the HTML response without output encoding, so an attacker could inject a script that runs in a victim's browser. The author demonstrated that the script executed and displayed the session cookies.

Mencari si dia Follow

Published on icikiwirsol.medium.com

Halo, saya Primandito Adi Setiya, seorang bug hunter. Pada 12 November 2025, saya sedang melakukan vulnerability testing pada portal layanan publik milik Pemerintah Kabupaten [REDACTED].

Mencari si dia, on icikiwirsol.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

The application reflected the 'redirect' parameter into the HTML response without output encoding or sanitisation.

Impact

An attacker could steal session cookies leading to account takeover, phish credentials, log keystrokes, or redirect users to a malicious site; the report notes the issue was still unfixed at publication.

What the attacker needed

Victim clicks a crafted link; none

The fix

The report recommends HTML entity encoding of reflected input, input validation on the redirect parameter, and a strong Content Security Policy; the text states the issue was not fixed.

How it was found

  1. Open the target login page.
  2. Insert an XSS payload into the 'redirect' URL parameter.
  3. Access the crafted URL and observe the browser executing the payload and showing a pop-up with session cookie values.

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 login page took a value from the web address and put it straight into the page without cleaning it. An attacker could craft a link that makes the victim's browser run attacker-controlled JavaScript, which could read cookies or change the page. This is called reflected cross-site scripting because the malicious input bounces back from the server.

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 Mencari si dia

View all

11 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.