Skip to content

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.

reports cited in this lesson
414

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.

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.

Year by year

13 years

What each year's disclosed reports show, newest first. A year with few reports says less.

Reports per yearPeak 2020: 264
Reports per year
200138
20072
20084
201011
201122
20126
20133
20149
20159
201622
201726
201831
201965
2020264
202191
2022140
202369
2024172
2025240
2026229
  1. 2026

    229 reports

    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.
    and 1 more

    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.
    and 2 more

    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.
  2. 2025

    240 reports · median $505

    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.
    and 1 more

    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.
    and 3 more

    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.
  3. 2024

    172 reports · median $4,263

    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.
    and 1 more

    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.
    and 4 more

    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.

    Reports from 202410

    Every point and report from 2024
Every point, year by year

Where it is found

66

The features and places the reports found it in, most-reported first.

  1. URL parameters on DoD assets.

    Seen in 12 reports
  2. Database features that allow command execution or file writes.

    Seen in 8 reports
  3. Numeric identifiers taken from the URL path.

    Seen in 6 reports
  4. Django ORM lookups, aliases and connectors.

    Seen in 6 reports
  5. Search boxes and search APIs.

    Seen in 5 reports
View all 66

Root causes

31

The mistakes in the code or configuration behind the reports.

  1. User input is concatenated into SQL queries instead of being bound as parameters.

    Seen in 52 reports
  2. A database library did not properly escape parameters.

    Seen in 8 reports
  3. URL path values were inserted into queries without validation.

    Seen in 4 reports
  4. Connectors re-escape their own output or inject names into statements.

    Seen in 3 reports
  5. A Solr query was built from user input without escaping, allowing local parameter injection.

    Seen in 2 reports
View all 31

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
More in WAF bypass and filter evasion

Other

of 3 ticked
  • Seen in 49 reports
  • Seen in 12 reports
  • Seen in 10 reports
More in Other

CMS and third-party software CVEs

of 3 ticked
More in CMS and third-party software CVEs

JSON body and API parameters

of 3 ticked
More in JSON body and API parameters
View more things to try

Bypasses and variations

285

How reports got past filters, encoders and other defences.

  1. Try unusual encodings and syntax variations against a leading WAF before exploiting the injection.

    Seen in 3 reports
  2. Use a tamper script to encode payloads past a WAF.

    Seen in 2 reports
  3. Use double encoding to get past a WAF.

    Seen in 1 report
  4. Use case variation and comments to get past a WAF.

    Seen in 1 report
  5. Use UNION with a WAF bypass to extract data.

    Seen in 1 report
View all 285

Payouts

58 paid

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

SeverityReportsPaidMedianHighest
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

Typical fixes

30

How programs fixed it, as the reports describe.

  1. Use parameterised queries and prepared statements for all database access, including bound parameters for every piece of user input.

    Seen in 52 reports
  2. Fix parameter escaping in database libraries, including the WordPress DB class prepare method.

    Seen in 9 reports
  3. Parameterise or sanitise URL path values before they reach SQL queries.

    Seen in 3 reports
  4. Quote and validate aliases before they reach generated SQL.

    Seen in 3 reports
  5. Escape user input before building Solr queries.

    Seen in 2 reports
View all 30

Tips for beginners

13

Advice for a first hunt, drawn from the reports.

  1. 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
  2. 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
  3. 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
  4. 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
  5. 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
View all 13

Guides and techniques

View all

The best explainers, cheat sheets and technique posts on SQL injection, from around the web.

Keep learning

Where this lesson fits, and what to read next.

Lessons on single techniques in SQL injection

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.