How I Hacked the Dutch Government with SQLi and Won the Famous T-Shirt?
A search function's filter parameter was vulnerable to SQL injection, allowing an attacker to execute time-delay queries. The reporter confirmed the issue and reported it to the Dutch government's NCSC.
Published on goktugkaya.medium.com
Hello, those who are at the computer day and night. While reading hacking posts on Medium, I saw someone win this t-shirt.
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.
What the report shows
The researcher picked a target from a public gist of bug bounty programmes and began testing a site belonging to the Dutch Government. The feature that drew attention was a search function with filters. The report does not name the host, the application or the exact endpoint.

The screenshot is captioned Example Request and shows the request the researcher started from. The report does not reproduce that request as text.
- The researcher inspected the filters for SQL injection.
- The GET request was changed to a POST request.
- A parameter called
query, which is not visible in the screenshot, was found to be vulnerable to SQL injection.

The second screenshot is captioned For ethical reasons, I didn’t want to see the all database. It shows the result of the test, and the researcher deliberately avoided extracting data.
The payload used was:
‘%2b(select*from(select(sleep(20)))a)%2b’
This is a time-based blind technique: the payload nests a sleep(20) inside a subquery aliased as a, and the surrounding quote characters and URL-encoded + signs are there to break out of the original string context and concatenate the injected expression. A response delayed by roughly twenty seconds confirms that the database executed the injected statement.
The vulnerability was reported to NCSC-NL, and the researcher received the programme's t-shirt. The report gives no severity rating, no CVSS score, no bounty amount and no details of the fix.

The final image shows the t-shirt that was awarded.
Root cause
The report identifies the query parameter as vulnerable to SQL injection; the exact construction is not shown. The exact construction is not shown, so this is the likely cause rather than a confirmed one.
Impact
The demonstrated impact is that the injected expression was executed by the database, shown by the time delay. The researcher chose not to enumerate the database, so the report does not establish what data was reachable. The report makes no claim about the sensitivity of that data.
How this kind of bug works
SQL injection happens when an application builds a query by joining strings, mixing constant SQL syntax with values that come from the request. The database cannot tell the two apart, so a value containing quote characters, comment markers or operators can close the intended literal and append new syntax. In a search feature the value usually lands inside a LIKE pattern or an IN list, which is why a single quote is often enough to produce an error or a change in behaviour.
Time-based blind injection is used when no output from the query is reflected. Instead of reading data directly, the attacker asks the database to pause conditionally, for example by nesting a sleep function inside a subquery, and measures the response time. The delay is the signal.
The defences that stop it are parameterised queries (prepared statements) so that values are bound rather than parsed as syntax, allow-listing for anything that cannot be bound, such as column names used in sorting, and least-privilege database accounts so that a successful injection reaches as little data as possible. Error messages should not be returned to clients, and a web application firewall can raise the cost of probing but is not a substitute for fixing the query.
How to test for it
- Map every input that reaches a query: search boxes, filter parameters, sort and order fields, pagination, and any parameter that appears in both GET and POST. Try submitting the same parameter under both methods, since handlers sometimes accept it either way.
- Start with benign probes: a single quote, a double quote, a backslash, and a balanced pair of quotes. Watch for database error text, a change in the number of results, or a different HTTP status.
- Move to boolean probes: compare a condition that is always true with one that is always false, keeping the rest of the request identical, and look for a consistent difference in the response body or length.
- Move to time-based probes when nothing is reflected. Use a short delay first, repeat it to rule out network jitter, and compare against a baseline request without the payload.
- Only after a confirmed signal, consider what data the account can reach, and stop at proof rather than extraction.
A positive result is a reproducible, payload-dependent difference: an error that appears only with the probe, a stable boolean difference, or a delay that repeats across several requests and disappears when the payload is removed. Common false positives are slow endpoints that are slow regardless of input, caches that return different bodies for unrelated reasons, generic error pages triggered by any unusual character, and WAF blocks that look like application errors. Always re-test with the payload neutralised to confirm the difference is caused by the injection and not by the environment.
How it is fixed
Use parameterised queries for every value, including filter and search parameters. Where a value cannot be bound, such as a sort column, map it against a fixed allow-list. Remove database error detail from responses. Run the application with a database account limited to the objects it needs. Add regression tests that submit quote characters and time-based payloads to each query-backed parameter.
Hunting notes
Search and filter features are a strong starting point because they often build dynamic SQL with optional clauses, and developers frequently parameterise the main value while leaving secondary filters, sort keys or pagination untouched. Parameters that accept the same value under GET and POST are worth trying both ways. Recon signals include error pages that mention a database engine, parameters whose names suggest query fragments, and endpoints that behave differently when a filter is removed entirely. To get a report accepted, show the smallest reproducible request, the baseline response, the response with the payload, and a clear statement of what the injection reaches, without dumping data you do not need.
What happened, in plain words
A security researcher was reading hacking posts on Medium when they saw someone win a t-shirt. That t-shirt was a reward from a bug bounty programme: a scheme where organisations invite people to test their systems and report problems, sometimes giving a small prize in return. The researcher decided to try to win one too.
From a public gist (a small page of shared notes) listing bug bounty programmes, the researcher picked a target site belonging to the Dutch Government and started testing it. The feature that caught their attention was a search function with filters. Think of it like an online shop where you type a word and tick boxes to narrow the results: the site takes what you type and what you tick, and asks its database to find matching records.

The screenshot is captioned Example Request and shows the request the researcher started from. A request is simply the message your browser sends to a server when you use a website: it says which page you want and what values you are sending. The report does not reproduce the request as text.
- The researcher inspected the filters for SQL injection. SQL is the language used to talk to databases, and SQL injection means slipping extra SQL into a value the site trusts, so the database runs commands the developer never intended.
- The researcher changed the GET request to a POST request. POST is the other common way of sending data, normally used when you submit a form; the values travel in the body of the request rather than in the address.
- A parameter called
query, which is not visible in the screenshot, turned out to be vulnerable to SQL injection. A parameter is just a named value in a request, like a labelled field on a form.

The second screenshot is captioned For ethical reasons, I didn’t want to see the all database. It shows the result of the test. The researcher deliberately avoided pulling data out of the database.
The payload used was:
‘%2b(select*from(select(sleep(20)))a)%2b’
A payload is the crafted value sent to trigger the bug. This one is a time-based blind technique, meaning the attacker cannot see any output from the database, so they use timing as the signal instead. Reading it piece by piece:
- The quote characters at each end are there to break out of the original string context, closing the text value the site expected so that new SQL can follow.
%2bis the URL-encoded form of a plus sign, which in this context acts as concatenation, joining the injected expression onto the original value.(select*from(select(sleep(20)))a)nests asleep(20)inside a subquery, andais just a name (an alias) given to that subquery so the syntax is valid.sleep(20)tells the database to pause for twenty seconds.
If the response comes back roughly twenty seconds late, the database executed the injected statement. The delay is the proof.
The vulnerability was reported to NCSC-NL, the Dutch national cyber security centre, and the researcher received the programme's t-shirt. The report gives no severity rating, no CVSS score, no bounty amount and no details of the fix.

The final image shows the t-shirt that was awarded.
In general, how this kind of bug works
SQL injection happens when an application builds a query by gluing strings together, mixing fixed SQL syntax with values that come from the request. The database cannot tell the two apart, so a value containing quote characters or operators can close the intended text and append new syntax. It is like a form where someone writes their name and then adds extra instructions on the same line, and the clerk reads the whole line as instructions.
Time-based blind injection is used when nothing from the query is shown back to you. Instead of reading data, you ask the database to pause, and you measure how long the reply takes. The delay is the signal.
The defences are parameterised queries (also called prepared statements), where values are bound rather than parsed as syntax; allow-lists for anything that cannot be bound, such as column names used in sorting; and database accounts with the least privilege needed, so a successful injection reaches as little data as possible. Error messages should not be returned to clients, and a web application firewall can raise the cost of probing but is not a substitute for fixing the query.
How to test for it
- Map every input that reaches a query: search boxes, filter parameters, sort and order fields, pagination, and any parameter that appears in both GET and POST. Try the same parameter under both methods, since handlers sometimes accept it either way.
- Start with benign probes: a single quote, a double quote, a backslash, and a balanced pair of quotes. Watch for database error text, a change in the number of results, or a different HTTP status.
- Move to boolean probes: compare a condition that is always true with one that is always false, keeping the rest of the request identical, and look for a consistent difference in the response body or length.
- Move to time-based probes when nothing is reflected. Use a short delay first, repeat it to rule out network jitter, and compare against a baseline request without the payload.
- Only after a confirmed signal, consider what data the account can reach, and stop at proof rather than extraction.
A positive result is a reproducible, payload-dependent difference: an error that appears only with the probe, a stable boolean difference, or a delay that repeats across several requests and disappears when the payload is removed. Common false positives are slow endpoints that are slow regardless of input, caches that return different bodies for unrelated reasons, generic error pages triggered by any unusual character, and WAF blocks that look like application errors. Always re-test with the payload neutralised to confirm the difference comes from the injection and not from the environment.
How it is fixed
Use parameterised queries for every value, including filter and search parameters. Where a value cannot be bound, such as a sort column, map it against a fixed allow-list. Remove database error detail from responses. Run the application with a database account limited to the objects it needs. Add regression tests that submit quote characters and time-based payloads to each query-backed parameter.
Hunting notes
Search and filter features are a strong starting point because they often build dynamic SQL with optional clauses, and developers frequently parameterise the main value while leaving secondary filters, sort keys or pagination untouched. Parameters that accept the same value under GET and POST are worth trying both ways. Recon signals include error pages that mention a database engine, parameters whose names suggest query fragments, and endpoints that behave differently when a filter is removed entirely. To get a report accepted, show the smallest reproducible request, the baseline response, the response with the payload, and a clear statement of what the injection reaches, without dumping data you do not need.
Glossary
- Bug bounty programme: a scheme where an organisation invites people to test its systems and report problems, sometimes with a reward.
- Gist: a small page of shared text or notes, often used to publish lists or snippets.
- Request: the message a browser sends to a server asking for a page or sending values.
- GET request: the ordinary request used when loading a page or submitting a search through the address bar.
- POST request: a request that sends values in the body, normally used when submitting a form.
- Parameter: a named value in a request, like a labelled field on a form.
- SQL: the language used to talk to databases.
- SQL injection: slipping extra SQL into a value the site trusts, so the database runs commands the developer never intended.
- Payload: the crafted value sent to trigger a bug.
- Time-based blind injection: a technique where no output is visible, so the attacker uses response timing as the signal.
- Subquery: a query nested inside another query.
- Alias: a name given to a subquery or table so the syntax is valid and it can be referred to.
- URL encoding: writing special characters in a form a URL can carry, such as
%2bfor a plus sign. - NCSC-NL: the Dutch national cyber security centre.
- Severity rating: a label describing how serious a vulnerability is.
- CVSS score: a standard numeric score for the severity of a vulnerability.
- Parameterised query (prepared statement): a way of building queries where values are bound separately and never parsed as SQL syntax.
- Allow-list: a fixed list of permitted values, used where a value cannot be bound.
- Least privilege: giving an account only the access it actually needs.
- Web application firewall (WAF): a filter in front of a site that blocks suspicious traffic; it raises the cost of probing but does not fix the underlying query.
- False positive: a result that looks like a finding but is caused by something else, such as a slow endpoint or a cache.