Test files › Security and validation › sql-injection-payloads.txt

SQL injection test payload list

Newline-delimited SQL injection strings for input-validation fuzzing. Includes tautologies, comment terminators, union probes and stacked-query syntax.

↓ Download sql-injection-payloads.txt
Filenamesql-injection-payloads.txt
FormatTXT
Size157 bytes (157 bytes)
MIME typetext/plain; charset=utf-8
SHA-256520b4965c786607d39fcfa27a840d0e6e99c7074e0703dccbcb0537ae316e0d3
What this file catchesForm fields and query parameters that concatenate rather than parameterise. Every one of these should be stored and echoed back as a literal string.

Handle it in code

Each snippet below was run against this exact file with Python 3.14.4 and Node 24.15.0 when this page was built, and the output shown is what it printed.

Python

Pass user input as a parameter, never by building the SQL string. Every payload is then stored as plain text, and the DROP TABLE line drops nothing.

import sqlite3

db = sqlite3.connect(":memory:")
db.execute("CREATE TABLE users (name TEXT)")
with open("sql-injection-payloads.txt", encoding="utf-8") as f:
    payloads = [line.rstrip("\n") for line in f if line.strip()]
for p in payloads:
    db.execute("INSERT INTO users (name) VALUES (?)", (p,))  # a parameter, not string formatting
stored = [row[0] for row in db.execute("SELECT name FROM users")]
print(f"{len(payloads)} payloads stored verbatim: {stored == payloads}")
print("tables:", [row[0] for row in db.execute("SELECT name FROM sqlite_master WHERE type = 'table'")])

Run against this file, it prints: 10 payloads stored verbatim: True tables: ['users']

Related guides and tools

Sample TXT and encoding test filesUpload validation checklistQA test stringsVerify its SHA-256

Download & verify

curl -fsSL -o "sql-injection-payloads.txt" "https://flagged.hexaqa.com/security/sql-injection-payloads.txt"
curl -fsSL "https://flagged.hexaqa.com/security/sql-injection-payloads.txt" | sha256sum # expect: 520b4965c786607d39fcfa27a840d0e6e99c7074e0703dccbcb0537ae316e0d3

More security and validation test files

eicar.com.txtgtube-spam.txthtml-xss-payloads.htmlpath-traversal-payloads.txtpolyglot-gif-html.gifshell-script.shwindows-batch.bat

← All Security and validation files