Skip to main content
INCIDENT 01 · SQL / PGlite

Security Arena: Incident Response

Six multi-engine breach-response missions: defeat SQL injection, patch XSS allowlists, eliminate ReDoS bombs, fix weak crypto, lock SSH/env files, and contain rogue scripts.

Incident 1: SQL Injection Auth Bypass

An attacker is bypassing login_safe with `' OR TRUE --` because the PL/pgSQL helper concatenates untrusted strings directly into dynamic SQL.

Replace string concatenation with parameterized `$1`, `$2` placeholders + `USING p_email, p_password_hash` so `sqli` returns `0` rows and `legit` returns `1`.

Stuck?

Learn the fundamental concepts in the Application Security course to solve this challenge.

SQL (PGlite WASM)
Loading editor…
Live Engine Output

Click "Run & Verify" to test your security patch directly against the browser runtime.