← Back to Learn Centre

What is SQL injection?

SQL injection is a web application weakness where untrusted input can interfere with database queries.

Simple example

A login or search field handles input unsafely, allowing an attacker to change how the database query behaves.

Why it matters

SQL injection can expose, change, or delete business data and is a serious application security issue.

Common warning signs

  • The activity is unexpected or unusual for the business context.
  • The request or system behaviour creates pressure to act quickly.
  • Normal approval, verification, or security processes are bypassed.
  • There are signs of unauthorised access, data exposure, or system change.
  • Staff are unsure whether the request, message, or system behaviour is legitimate.

Cyber Doc view

This term should be understood in business context, not only as a technical issue. Good protection usually combines clear processes, appropriate technical controls, staff awareness, and a calm response plan.

What to do

Proactive steps

  • Use parameterised queries or safe database libraries.
  • Validate and sanitise input.
  • Avoid exposing detailed database errors.
  • Test applications for injection weaknesses.
  • Keep frameworks and libraries updated.

Reactive steps

  • Take the affected function offline if active exploitation is suspected.
  • Preserve web and database logs.
  • Review whether data was accessed or changed.
  • Patch the vulnerable code.
  • Rotate credentials if database secrets may be exposed.

Related terms

  • Input validation
  • Web application security
  • Penetration testing