Aller au contenu
SQLi · SQL Injection

A few quotes.
One admin account.

A payload in the username field is enough to rewrite the SQL query. Password verification disappears. The attacker logs in as admin without knowing a single credential.

Auth bypassSQL payloadAdmin accessOWASP A03
monentreprise.com/login
Login portal
MyCompany — HR Portal

Sign in to your account

Password

••••••••
Sign in
Step 1 of 4

A standard login form

The application's front door, with a username and password

Every input field is an attack surface

Login forms, search bars, filters, URL parameters... anywhere a user value is passed to a database. If the code directly concatenates the input into the SQL query, the flaw exists by construction.

Key figures

#0

OWASP Top 10

Injection · A03:2021

≤ 0 min

To exploit

a vulnerable endpoint

0%

Of vulnerable apps

that concatenate input

0 line

To fix

with a parameterized query

Technical demo

Try it yourself

This simulation lets you inject a real SQL payload and watch the generated query live. Intended for technical teams and trainers.

SQL Injection

Login bypassed via payload

Front-end simulation

Generated SQL:

SELECT * FROM users WHERE email = '' AND password = '';

Authentication payload

' OR '1'='1' -- 

This string forces the condition to true, bypassing authentication if the query isn't parameterized.

Why it's critical

Here, the application directly uses the entered values to build a SQL query. An attacker can alter the query and log in as another user.

For a decision-maker, this means sensitive data can be exposed without the code ever knowing it was manipulated.

How to protect against it

  • Never concatenate user text into a SQL query.
  • Use parameterized queries.
  • Validate and normalize inputs.
  • Restrict database account permissions.
SELECT * FROM users WHERE email = $1 AND password = $2; -- bound values, no concatenation