Skip to content
XSS Write-up Beginner

Reflected XSS via a hidden parameter on Dutch Gov. website

A hidden GET parameter 'source' was reflected unencoded inside a script tag, allowing an attacker to break out and execute JavaScript. An attacker could send a crafted link to an administrator to steal session cookies and access the back-office.

Supras Follow

Published on supras.io

This summer I came across the Bug Bounty program of the Dutch Government, and I saw that as a reward it offers you a super cool t-shirt ! I have to redo my wardrobe, so why not give it a try ? ๐Ÿ˜‰

Supras (@LdrTom), on supras.io

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 'source' parameter into a script tag without HTML-encoding it, allowing script tag injection.

Impact

An attacker could steal an administrator's session cookies and gain access to the back-office, though this relies on the victim clicking a crafted link and cookies not being protected by HttpOnly.

What the attacker needed

Victim clicks a crafted link; cookies not protected by HttpOnly

The fix

The vulnerability was fixed by the Dutch government security team a few days after reporting.

How it was found

  1. Browse the site with a proxy to record requests.
  2. Use a parameter discovery tool to find hidden GET parameters.
  3. Identify the 'source' parameter as reflected in the page source.
  4. Inject a payload that closes the script tag and opens a new one with JavaScript.
  5. Observe the alert box confirming XSS.

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 took a value from the URL and put it directly into the page's code without cleaning it. An attacker could craft a link that, when clicked, runs their own code in the victim's browser. This is called reflected cross-site scripting (XSS).

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 Supras

View all

2 more disclosed reports, best first.

More from Dutch Government

View all

The newest disclosed reports for this program.

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.