In-depth lesson · bug class
SQL injection
What every disclosed SQL injection report in the index teaches, put together: how it works, how it changed year by year, where it turns up, and things to try. Every point shows the reports it is seen in.
- disclosed reports read
- 1,659
- reports cited in this lesson
- 414
- median public bounty
- $1,750
Learning SQL injection reading list Server-side injection, step 5
Overview
What it is and why programs pay for it.
SQL injection is a flaw where user input reaches a database query without being properly separated from the query's structure. The evidence shows it recurring across URL parameters, path segments, search boxes, login fields, headers, JSON bodies and GraphQL arguments, on targets ranging from government sites to WordPress plugins and enterprise appliances. Programs care because a confirmed injection can expose or alter the whole database, and in several reports it was chained to command execution or file writes.
The root cause is almost always the same: input is concatenated into a statement instead of being bound as a parameter, or a library, ORM or connector fails to escape it. The evidence includes raw concatenation, bad escaping in database libraries, unsafe alias and connector handling, and ORM methods that accept raw fragments. It also shows that defences such as WAFs and input filters are often incomplete, so a blocked payload does not mean the endpoint is safe.
Where it turns up most often in this evidence: ordinary request parameters on new targets, numeric identifiers in URL paths, search boxes and search APIs, login and password reset fields, sort and order parameters, WordPress plugin handlers, legacy CGI scripts, and known vulnerable appliances. The typical fix is parameterised queries everywhere, including dynamic fragments such as ORDER BY and aliases, plus patching known CVEs.
Seen in these reports17
-
High -
Critical -
Medium
Show 5 moreShow fewer
-
-
$3,000 -
$2,000 Critical -
Critical -
High
How it works
The mechanics, as the reports show them.
A query is built by joining fixed SQL text with user input. If the input contains characters that change the query's meaning, the database executes a different statement than the developer intended. The evidence shows this happening when parameters, path values, JSON keys, headers and GraphQL arguments are inserted directly into queries.
The mistake is usually a missing bound parameter. Sometimes the developer uses an ORM but passes a raw ordering fragment or alias, or a library's escaping is flawed, or a connector re-escapes its own output. The evidence lists these as distinct root causes, which is why reviewing how queries are assembled matters as much as testing inputs.
To confirm, hunters send a value that should change the query's result or timing and compare it with a neutral value. The evidence describes true and false conditions in search fields, single quotes to trigger database errors, and conditional delays in parameters, sort fields and login usernames. Comparing status codes, response lengths and response times is the usual way to tell a real injection from noise.
Once confirmed, the impact depends on what the database account can do. The evidence shows injections used to dump databases, read files, write files, execute commands, and chain into deserialisation or XSS. It also shows blind and time-based techniques being used where error output is suppressed, and manual boolean testing where tools fail.
Defences are frequently bypassed rather than absent. The evidence records WAF bypasses using encoding, case variation, comments, alternative syntax and scientific notation, plus reaching the service directly by IP or stopping a redirect to a login page. This means a blocked request is not evidence of safety, and testing should continue with variations before concluding an endpoint is clean.
Seen in these reports24
-
-
$4,263 High -
$3,000
Show 5 moreShow fewer
-
$2,000 Critical -
$1,000
-
High -
High -
Critical
Year by year
13 yearsWhat each year's disclosed reports show, newest first. A year with few reports says less.
| 2001 | 38 |
|---|---|
| 2007 | 2 |
| 2008 | 4 |
| 2010 | 11 |
| 2011 | 22 |
| 2012 | 6 |
| 2013 | 3 |
| 2014 | 9 |
| 2015 | 9 |
| 2016 | 22 |
| 2017 | 26 |
| 2018 | 31 |
| 2019 | 65 |
| 2020 | 264 |
| 2021 | 91 |
| 2022 | 140 |
| 2023 | 69 |
| 2024 | 172 |
| 2025 | 240 |
| 2026 | 229 |
-
2026
New this year4
- Reports on database connector and utility libraries rather than web applications first appear prominently in the disclosed reports.
- Testing GET parameters of old CGI scripts for time based blind injection is a new pattern in the disclosed reports.
- Exploiting route confusion in a REST batch endpoint to reach an injectable query unauthenticated appears in the disclosed reports.
Kept working4
- Reports cluster heavily on NASA and other government programmes with unauthenticated injection.
- Sending true and false conditions in a search field and comparing result sets confirmed boolean blind injection.
Turned up less2
- Django ORM lookups, aliases and connectors, seen in 2025, are rarer in the 2026 reports.
- Creating a FilteredRelation with an alias containing a double quote and using it in select_related, seen in 2025, is rarer in the 2026 reports.
-
2025
New this year4
- ORM and framework level injection in Django first appears prominently in the disclosed reports.
- Unpacking user supplied dictionaries into a Q object and controlling the connector key is a new pattern in the disclosed reports.
- Testing JSONField key transforms for injection appears in the disclosed reports.
Kept working5
- Putting a single quote into a numeric identifier taken from the URL path and watching for a database error or changed response found issues.
- Creating a FilteredRelation with an alias containing a double quote and using it in select_related worked.
Turned up less2
- Testing aggregation pipelines for NoSQL injection, seen in 2024, is rarer in the 2025 reports.
- In a SELECT-only PostgreSQL injection, abusing filesystem functions to read files, seen in 2024, is rarer in the 2025 reports.
-
2024
New this year4
- Testing aggregation pipelines for NoSQL injection first appears in the disclosed reports.
- In a SELECT-only PostgreSQL injection, abusing filesystem functions to read files is a new pattern in the disclosed reports.
- Passing crafted JSON object keys as column aliases to values and values_list and checking the generated SQL appears in the disclosed reports.
Kept working6
- Sending true and false conditions in a search field and comparing result sets confirmed boolean blind injection.
- Time-based blind injection confirmed by comparing sleep durations was productive in the disclosed reports.
Turned up less1
- Reviewing MOVEit Transfer code for SQL injection and testing whether it reaches remote code execution, seen in 2023, is rarer in the 2024 reports.
Earlier years10
Where it is found
66The features and places the reports found it in, most-reported first.
-
URL parameters on DoD assets.
Seen in 12 reports
-
Database features that allow command execution or file writes.
Seen in 8 reports
-
Numeric identifiers taken from the URL path.
Seen in 6 reports
-
Django ORM lookups, aliases and connectors.
Seen in 6 reports
-
Search boxes and search APIs.
Seen in 5 reports
Technologies in these reports16
Root causes
31The mistakes in the code or configuration behind the reports.
-
User input is concatenated into SQL queries instead of being bound as parameters.
Seen in 52 reports
-
A database library did not properly escape parameters.
Seen in 8 reports
-
URL path values were inserted into queries without validation.
Seen in 4 reports
-
Connectors re-escape their own output or inject names into statements.
Seen in 3 reports
-
A Solr query was built from user input without escaping, allowing local parameter injection.
Seen in 2 reports
Things to try
The most-reported tests in the largest contexts. Tick what you have tried; ticks stay in this browser and carry over to the full checklist. Test only what a program's scope allows.
ticked in this lesson
WAF bypass and filter evasion
of 3 ticked-
Seen in 3 reports
-
Seen in 2 reports
-
Seen in 2 reports
CMS and third-party software CVEs
of 3 ticked-
Seen in 3 reports
-
Seen in 2 reports
JSON body and API parameters
of 3 ticked-
Seen in 3 reports
-
Seen in 3 reports
-
Seen in 2 reports
Bypasses and variations
285How reports got past filters, encoders and other defences.
-
Try unusual encodings and syntax variations against a leading WAF before exploiting the injection.
Seen in 3 reports
-
Use a tamper script to encode payloads past a WAF.
Seen in 2 reports
-
Use double encoding to get past a WAF.
Seen in 1 report
-
Use case variation and comments to get past a WAF.
Seen in 1 report
-
Use UNION with a WAF bypass to extract data.
Seen in 1 report
Payouts
58 paidPublic bounties in US dollars, from the data. 58 of 1,659 reports show an amount.
- a quarter paid up to
- $501
- median
- $1,750
- three quarters paid up to
- $3,406
- highest
- $25k
One in ten paid reports was paid $5,000 or more.
| Severity | Reports | Paid | Median | Highest |
|---|---|---|---|---|
| Critical | 176 | 11 | $2,000 | $25k |
| High | 515 | 5 | $2,500 | $4,500 |
| Medium | 135 | 2 | $1,400 | $2,500 |
| Low | 13 | 5 | $150 | $505 |
| Informational | 3 | 0 | None paid | None |
| Unrated | 817 | 35 | $1,500 | $20k |
Highest-paid reports5
-
$25,000 Critical -
$20,000
-
$10,000 -
$8,000
-
$6,400
Typical fixes
30How programs fixed it, as the reports describe.
-
Use parameterised queries and prepared statements for all database access, including bound parameters for every piece of user input.
Seen in 52 reports
-
Fix parameter escaping in database libraries, including the WordPress DB class prepare method.
Seen in 9 reports
-
Parameterise or sanitise URL path values before they reach SQL queries.
Seen in 3 reports
-
Quote and validate aliases before they reach generated SQL.
Seen in 3 reports
-
Escape user input before building Solr queries.
Seen in 2 reports
Tips for beginners
13Advice for a first hunt, drawn from the reports.
-
Do not stop at the first blocked request. The evidence records WAF bypasses using encoding, case variation, comments, alternative syntax and scientific notation, and reaching services directly by IP or stopping redirects.
Seen in 5 reports
-
Compare true and false conditions in search fields and JSON bodies, watching status codes and response lengths. The evidence shows this working where scanners failed and where the search term was split before reaching the query.
Seen in 4 reports
-
Test headers and less obvious inputs such as the User-Agent, Referer, cookies and custom headers. The evidence records injections in these locations, confirmed with time delays.
Seen in 4 reports
-
Test GraphQL arguments and variables, and NoSQL-backed endpoints, because resolvers and query builders may pass them straight to the database. The evidence shows both SQL and NoSQL injection through these paths.
Seen in 4 reports
-
Remember that ORMs and prepared statements do not cover every path. The evidence shows dynamic fragments, aliases and connectors still being injectable, so review how raw fragments are handled.
Seen in 4 reports
Guides and techniques
View allThe best explainers, cheat sheets and technique posts on SQL injection, from around the web.
-
NoSQLi: A complete guide to exploiting advanced NoSQL injection vulnerabilitiesComprehensive guide to NoSQL injection covering operator injection, authentication bypass, time-based data extraction and server-side JavaScript execution.
Explainer intigriti.com
-
SQLi: The ultimate Bug Bounty guide to exploiting SQL injection vulnerabilitiesExplains basic and advanced SQL injection including blind, time-based and out-of-band techniques with payload tailoring advice.
Explainer yeswehack.com
-
Same Same But Different: Discovering SQL Injections Incrementally with Isomorphic SQL StatementsIntroduces isomorphic SQL statements to test injections across contexts while evading WAFs and sanitisation.
Technique spaceraccoon.dev
-
Cypher Injection ScannerA Burp extension that scans for Cypher injection in Neo4j backed applications and GraphQL endpoints.
portswigger.net
-
Getting rid of pre- and post-conditions in NoSQL injectionsSensePost shows how to remove pre and post conditions in MongoDB syntax injection to make payloads more reliable.
Technique sensepost.com
Keep learning
Where this lesson fits, and what to read next.
Learning paths
Lessons on single techniques in SQL injection
Lessons to read next
How this is made: our model read every listed SQL injection report in the index (our own summary where we have one, otherwise the title and the platform's label), listed the patterns, and merged them. Each point was kept only if the reports it cites exist, are listed and belong here; payouts are computed from the data, not written by the model. Read the originals before relying on a point. Generated 26 Nov 2026 from 432 reports. All SQL injection reports.