What is SQL injection?
also: SQLi
// short answer
A flaw where a website passes what a visitor typed straight into its database, letting an attacker read or change data they should not reach.
In plain English
Most websites store their content, orders and users in a database and talk to it using a language called SQL. SQL injection happens when a site builds those database commands by pasting in whatever a visitor typed, without handling it safely.
A carefully crafted input can then change the meaning of the command — for example, returning every customer record instead of one, or bypassing a login. The standard fix in code is to use parameterised queries, which keep the visitor's input separate from the command.
SQL injection usually lives in custom code and plugins. It cannot be found by a passive check, and testing for it on a site you do not own is illegal. Finding it requires authorised testing such as a penetration test.
Why it matters to a small business
A single SQL injection flaw can expose an entire customer database, which under POPIA is likely to be a notifiable breach. It is old and well understood, but it still turns up, especially in neglected plugins.
What to do
- Keep your CMS and plugins updated, and remove abandoned ones.
- Ask developers to use parameterised queries for any custom database code.
- For sites with valuable data, arrange an authorised vulnerability scan or penetration test.