Quick answer
SQL injection is a web application vulnerability in which user input is inserted into a database query without proper handling, letting an attacker change the query. It can expose entire databases, bypass logins or alter data, and remains common in custom and legacy applications.
On this page
How It Works
When an application builds a query by joining strings with user input, an attacker can supply input that closes the intended query and adds their own. Blind variants infer data one bit at a time from response differences or delays. Automated tools find simple cases quickly; complex cases in search filters, sorting parameters, APIs and stored procedures need manual testing.
Why It Matters
A single injectable parameter can expose every record in a database, including personal and payment data, triggering breach notification obligations.
How to Test for It
- Test every input, including headers, cookies, JSON bodies and API parameters, not just form fields.
- Combine automated scanning with manual testing of complex queries.
- Check error handling for database messages that help attackers.
- Review the database permissions the application uses.
How to Reduce the Risk
Use parameterized queries or safe ORM methods everywhere, validate input, give the application database account the least privilege it needs, suppress detailed errors and include SQL injection testing in every release of internet-facing applications.
Regulatory and Framework Context
For US organizations, injection testing supports PCI DSS requirements for public-facing applications and state data protection laws.
Latest intel on this topic
- Attackers Exploit UnrealIRCd Flaw That Enables Server-Level Command InjectionThe Hacker News · November 14, 2026
- Hitachi Energy CoreTec ProductCISA · October 29, 2026
- Self-generated prompt injections in compaction summariesSimon Willison (prompt injection) · September 17, 2026
- LLM Heist: Hijacking LiteLLM for Traffic Interception, Key Theft, and Tool-Call InjectionEmbrace The Red · August 3, 2026
- AI Worming through WordSimon Willison (prompt injection) · July 29, 2026
Updated hourly from the daily briefing.
Common questions
Is SQL injection still common?
Less common in modern frameworks, but still found regularly in custom code, legacy systems, APIs and reporting features.
Can a web application firewall stop SQL injection?
It can block many attempts, but determined attackers bypass rules. Fixing the code is the real control.
For testers: finding write-ups
How this shows up in a penetration test report, with severity, verification and remediation, in the StrikeOps Findings Library.
Change log
- November 13, 2026First published.