Skip to content
CORS Write-up Beginner

How a Curious Curl and a Ghost Domain Got Me into the Dutch Gover

A government login portal reflected an unregistered lookalike domain in its CORS allow-origin header while also allowing credentials. An attacker could register that domain and host a page that makes credentialed cross-origin requests to read sensitive data from the portal.

Harsh kothari Follow

Published on osintteam.blog

I was just casually running Nuclei on a list of Dutch government subdomains when something caught my eye.

Harsh kothari, on osintteam.blog

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 a typo in the CORS allow-list: the server echoed an unregistered lookalike origin and allowed credentials.

Impact

An attacker who registered the domain could host a page that makes credentialed cross-origin requests and potentially steal cookies, tokens or sensitive data, though the text does not show a working exploit.

What the attacker needed

Attacker registers the lookalike domain; victim visits attacker page while logged in

The fix

The issue was fixed after disclosure; the suggested fixes were to restrict allowed origins and disable credentials.

How it was found

  1. Run Nuclei against government subdomains and notice a CORS finding on the login portal.
  2. Visit the flagged origin domain and confirm it is not registered.
  3. Send a request with that origin in the Origin header and observe the reflected allow-origin and credentials headers.

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.

CORS is a browser rule that lets a website say which other sites may read its responses. This site trusted a domain that did not exist, so anyone could buy that name and build a page that the victim's browser would let read private data from the real site. The site also allowed cookies to be sent, which made the risk worse.

What is CORS?

A permissive cross-origin policy lets another site read responses with the user's credentials.

More by Harsh kothari

View all

4 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

CORS misconfiguration

The lesson behind this report.

A permissive cross-origin policy lets another site read responses with the user's credentials.