This demo page is intentionally vulnerable to SQL Injection, showcasing both:
This form is meant to simulate a basic login system that is vulnerable to SQL Injection.
It uses the following insecure query:
This query directly includes user input without sanitization, allowing attackers to inject SQL code.
admin' OR '1'='1
→ Logs you in as any useradmin' AND SLEEP(5) AND '1'='1
→ Simulates time-based attacks (MySQL)This form demonstrates a Second Order SQL Injection, where the attacker inputs SQL code as “feedback.”
Insecure code looks like:
This allows an attacker to inject arbitrary SQL commands by manipulating the feedback
input.
This will insert a brand new user into the sqlbad
table without any authorization check.
⚠️ Reminder: These vulnerabilities are intentional for learning purposes. Never use such code in production!