Reading the Figures on SQL Injection Without Being Misled
News articles and blog posts often quote big numbers about SQL injection. Some are reliable, some are guesses, and many are repeated without a source. Here is a beginner's guide to where real figures come from and what each one actually counts.
The main public sources
CVE and the National Vulnerability Database
When someone finds a security bug in a piece of software and it is reported publicly, it usually gets a CVE identifier (CVE stands for Common Vulnerabilities and Exposures). The US National Vulnerability Database (NVD), run by NIST, adds details to each CVE, such as a severity score and the type of weakness.
What it counts: publicly reported vulnerabilities in software products. What it misses: bugs in private websites and in-house apps, which are rarely given CVEs.
CWE
CWE (Common Weakness Enumeration), maintained by MITRE, is a catalogue of *types* of weakness. SQL injection is CWE-89. When a CVE is linked to CWE-89, it is counted as a SQL injection vulnerability. MITRE's yearly "Top 25" list ranks weakness types using this data.
Breach and incident reports
Security companies and some telecoms firms publish yearly reports about data breaches they investigated or collected. The Verizon Data Breach Investigations Report is a well-known example. These reports describe how attackers got in, which sometimes includes web application attacks such as injection.
What they count: incidents that the report's authors and partners saw. What they miss: everything outside that group.
Why numbers disagree
| Question | Why answers differ |
|---|---|
| How many SQL injection bugs exist? | Only reported bugs in public software are counted |
| How many attacks happen? | Most attacks are automated scans that are never reported |
| How many breaches were caused by it? | Breach reports cover different organisations and use different categories |
None of these sources is wrong. They simply measure different things.
How to read a headline
When you see a claim, ask four questions:
- Who measured it? A named public database or report is better than "studies show".
- What exactly was counted? Vulnerabilities, attack attempts and successful breaches are three different things.
- When? Figures from one year may not describe another.
- Is there a link to the original? If a number has been copied from blog to blog with no source, treat it with suspicion.
What a beginner should take from all this
You do not need exact figures to make the right choice. Every major source agrees that SQL injection is a well-known, recurring weakness, and every security guide gives the same fix: use parameterised queries (placeholders) so user input is never treated as SQL.
// node-postgres example with a placeholder
await client.query('SELECT * FROM books WHERE title = $1', [title]);
For the background on why the problem persists, see our evidence review on SQL injection.
A free learning page for beginners. Practise on a test database, never on real customer data, and check the official documentation for your database version.
General commentary only: this page does not report specific news events and does not cite a survey or data source. Treat any trends described as unverified.