Injection flaws occur when untrusted input is passed to an interpreter as part of a command or query, letting attackers alter the intended logic — from stealing entire database tables to bypassing authentication. Try the interactive playground below to see a classic SQL injection login bypass, and how parameterized queries stop it cold.
OWASP TOP 10 · 2025 · A05 — INJECTION
Injection happens when untrusted input is concatenated directly into a command or query interpreter — SQL, NoSQL, an OS shell, LDAP — so the interpreter can no longer tell data from code. A carefully crafted string like ‘ OR ‘1’=’1′ — doesn’t just fill a field, it changes the meaning of the query itself. Below, try logging into a simulated bank admin panel in both a vulnerable and a secure implementation to see exactly how that happens.
Internal login — simulated environment, no real backend.
Simulated backend
Vulnerable vs. secure code
query = ( "SELECT * FROM users WHERE " "username='" + user + "' " "AND password='" + pass + "'" ) cursor.execute(query)
query = (
"SELECT * FROM users WHERE "
"username=%s AND password=%s"
)
cursor.execute(query, (user, pass))
How to detect & fix