Application vulnerabilities

SQL injection

SQLi · SQL injection attack · blind SQL injection · SQL code injection · injection SQL

An attack that slips database commands into an input field or URL in order to read, change or delete data the attacker should never be able to touch.

In practice

The flaw appears when an application builds its SQL queries by pasting in whatever the user typed. An attacker can then bypass a login, dump an entire customer database or, in some cases, take over the server. Known since the late 1990s and simple to fix, it still features in the OWASP Top 10:2025 (A05, Injection), which counts more than 14,000 SQL injection CVEs.

Example

In late May 2023, the Cl0p group exploited a previously unknown SQL injection flaw (CVE-2023-34362) in the MOVEit Transfer file transfer software. It installed a backdoor and stole data from many organisations around the world before a patch was even available.

How to protect yourself

  • Parameterised queries (prepared statements) everywhere, never string concatenation of user input.
  • Allow-list validation for anything that cannot be parameterised (column names, sort order).
  • A least-privilege database account for the application.
  • SAST code analysis and a penetration test before go-live; a WAF as an extra layer, never a substitute.

Sources

The whole glossary

From theory to practice

So how does your system measure up?

Create your account and get an A+ to F grade for your domains’ encryption in minutes, with every finding explained and the fix to apply.

Run the audit from your account: an A+ to F grade for your domains’ encryption in minutes, with every finding explained and the fix to apply.

Belinda

Contact us

A question, a project, a partnership? Write to us: the team answers by email, usually within one business day.

Your details are only used to answer you. Do not include passwords or vulnerability details.