$ ./guess_the_languageSQL & Databases
SQL & Databases · hard · #52

What kind of vulnerability is this?

-- signup stores the name safely with a placeholder:
--   name = "x' OR '1'='1"
-- a nightly job later does:
sql = "DELETE FROM tmp WHERE owner = '" + name + "'"
  1. Blind time-based injection
  2. Stored cross-site scripting
  3. Privilege escalation via GRANT
  4. Second-order SQL injection
The payload is stored harmlessly, then injected when trusted-looking data from the database is concatenated into new SQL.
Play SQL & Databases ▸