# Blind SQL Injection
> SQL injection where the query result never appears in the response, so data is recovered indirectly through boolean oracles, time delays, or out-of-band callbacks.
## How it works
The injection is real but the application returns no query output and no database error — only a difference in behavior. The attacker converts a yes/no question about the data into an observable signal and extracts the database one bit or character at a time ([[raw/hadrian.io/when-the-database-won-t-talk-a-deep-dive-into-blind-sqli-4214|deep dive into blind SQLi]]). Three channels:
- **Boolean-based** — inject a condition and observe a content/behavior differential between a true and false predicate (page differs, record returned or not). The `total_affected_items`-style count field or a "login succeeded" flag can serve as the oracle (Wazuh `_substitute_params` leaks agent secrets through a boolean oracle on the response count; Keep CEL-to-SQL uses result counts).
- **Time-based** — when even true/false isn't visible, gate a sleep on the predicate. The response latency is the oracle ([[raw/osintteam.blog/time-based-blind-sql-injection-when-the-database-talks-in-seconds-15201|the database talks in seconds]]).
- **Out-of-band (OOB)** — coerce the DB to make a DNS/HTTP request whose subdomain carries exfiltrated data; asynchronous and reliable when the request-response channel is useless. Depends on [[Out-of-Band Detection]].
## Techniques / payloads
Engine-specific time primitives (the fingerprint determines which works):
| Engine | Unconditional delay | Conditional delay idiom |
|---|---|---|
| MySQL/MariaDB | `SLEEP(10)` | `IF(<cond>,SLEEP(10),0)` |
| PostgreSQL | `pg_sleep(10)` | `CASE WHEN <cond> THEN pg_sleep(10) ELSE pg_sleep(0) END` |
| MSSQL | `WAITFOR DELAY '0:0:10'` | `IF (<cond>) WAITFOR DELAY '0:0:10'` |
| Oracle | `dbms_pipe.receive_message(('a'),10)` | gate the same call in a `CASE ... FROM dual` |
(Reference table from [[raw/portswigger.net/sql-injection-cheat-sheet-web-security-academy-484|PortSwigger cheat sheet]].) Data is read with substring + comparison, driving a character-by-character search; a binary search over character codes cuts requests to ~log2 per character. Boolean filter-bypass variants lean on `INSERT`, `REPEAT`, `RLIKE` and conditional constructs to survive WAFs and to brute hashed passwords ([[raw/secjuice.com/advanced-boolean-based-sqli-filter-bypass-techniques-4215|boolean filter bypass]]). OOB on MSSQL abuses UNC-path/stored-procedure egress (e.g. `xp_dirtree`) to fire DNS lookups ([[raw/netspi.com/second-order-sql-injection-with-stored-procedures-and-dns-based-egress-4213|DNS-based egress]]); PortSwigger's OOB labs chain a UNC/XML-external path to a Collaborator domain and append the stolen value as a subdomain.
Heavy-query delays work where no sleep function is usable: sqlmap's DB2 payload cross-joins `SYSIBM.SYSTABLES` to burn seconds, and only runs at `--level=5 --risk=3`; SQLite's equivalent is a large `RANDOMBLOB` hashed inside `LIKE` ([[raw/infosecwriteups.com/the-devil-went-down-to-georgia-how-i-made-60k-hacking-the-dhs-15835|$60k Georgia DHS]], [[raw/sahandbabali.com/picoctf-2026-sql-map1-writeup-15842|picoCTF Sql Map1]]). A delay that scales with rows matched (≈860 posts × `SLEEP(0.01)` ≈ 9 s) is strong evidence the injected function runs per row, and keeps tests non-destructive ([[raw/hackerone.com/essity-unauthenticated-sql-injection-via-rest-batch-route-confusion-15838|Essity WP batch route confusion]]). When a WAF blocks `UNION`, boolean inference with `ASCII(SUBSTR(...))` and a binary search over 32–127 still extracts data ([[raw/blog.martindios.com/sqli-at-nasa-how-i-got-my-letter-of-recognition-15836|SQLi at NASA]]). Polyglot time payloads that fire in unquoted, single- and double-quoted contexts at once speed up triage ([[raw/medium.com/how-i-discovered-a-blind-sql-injection-in-a-private-program-15837|blind SQLi in a private program]]).
Oracle time-based without `SLEEP`: `DBMS_PIPE.RECEIVE_MESSAGE` is the standard delay primitive, as used against a government portal's Oracle-backed password-recovery function ([[raw/infosecwriteups.com/discovering-an-time-based-blind-sql-injection-in-a-tamil-nadu-governme-10830|Oracle time-based]]).
## Notable cases
- **Exim 4.98 CVE-2025-26794** — blind SQLi into Exim's internal SQLite via the `ETRN` command's semaphore handling in `hintsdb.h`; DoS and hypothetical RCE ([[raw/github.com/cve-2025-26794-blind-sql-injection-in-exim-4-98-writeup-4636|writeup]]).
- **Craft `search` / `findOne()`** — the injection point sits in a `WHERE` clause with nothing reflected, so exploitation is necessarily blind (boolean/time) despite being unauth and critical (see [[ORM Injection]]).
- **Keep 0.34.10–0.55.0 CVE-2026-129166** — blind SQLi in the CEL-to-SQL converter; authenticated users with `read:alert` use result counts as a boolean oracle to read other tenants' alerts and password hashes.
- **WordPress 7.0 REST batch (Essity)** — unauth blind SQLi in `NOT IN (...)` via batch dispatch desync; confirmed purely by scaled timing ([[raw/hackerone.com/essity-unauthenticated-sql-injection-via-rest-batch-route-confusion-15838|Essity WP batch route confusion]]).
- **Georgia DCSS (DB2)** — unauth time-based blind via the `ssn` JSON field; paid $25k, plus $20k for the same sink on password reset ([[raw/infosecwriteups.com/the-devil-went-down-to-georgia-how-i-made-60k-hacking-the-dhs-15835|$60k Georgia DHS]]).
- **NASA subdomain (Oracle)** — boolean blind behind a `UNION`-blocking WAF; query leaked by Tomcat stack traces ([[raw/blog.martindios.com/sqli-at-nasa-how-i-got-my-letter-of-recognition-15836|SQLi at NASA]]).
- **Bugcrowd private program** — time-based `asset_id` on an SSO-bypassing origin IP, rated P1 ([[raw/medium.com/how-i-discovered-a-blind-sql-injection-in-a-private-program-15837|blind SQLi in a private program]]).
- **Worklenz < 3.3.0** — time-based blind on `projects`/`status` reporting params, reading password hashes.
- **Futurum Software CVE-2026-14571 (CVSS 9.1)** — unauth blind SQLi in the auth module, bypassing a misconfigured WAF to exfiltrate PII.
## Defenses
Parameterize so no predicate reaches the parser; allow-list identifiers (most blind 2026 CVEs are sort/filter identifiers). Blind SQLi is detectable in logs by anomalous timing patterns and bursts of near-identical requests, and by unexpected outbound DNS from the DB host — monitor for both ([[raw/hadrian.io/when-the-database-won-t-talk-a-deep-dive-into-blind-sqli-4214|detection signals]]). Disabling the DB host's outbound network kills the OOB channel.
## Related
- [[SQL Injection]]
- [[Union-Based SQL Injection]]
- [[Second-Order SQL Injection]]
- [[Out-of-Band Detection]]
- [[WAF Bypass for SQL Injection]]
- [[sqlmap]]
## Sources
- [[raw/blog.martindios.com/sqli-at-nasa-how-i-got-my-letter-of-recognition-15836|SQLi at NASA: how I got my Letter of Recognition]]
- [[raw/github.com/cve-2025-26794-blind-sql-injection-in-exim-4-98-writeup-4636|CVE-2025-26794: Blind SQL Injection in Exim 4.98]]
- [[raw/github.com/keep-0-34-10-0-55-0-blind-sql-injection-in-cel-to-sql-14514|Keep blind SQL injection in CEL-to-SQL]]
- [[raw/hackerone.com/essity-unauthenticated-sql-injection-via-rest-batch-route-confusion-15838|Essity: Unauthenticated SQL Injection via REST Batch Route Confusion ████████]]
- [[raw/hadrian.io/when-the-database-won-t-talk-a-deep-dive-into-blind-sqli-4214|When the Database Won't Talk: A Deep Dive into Blind SQLi]]
- [[raw/incibe.es/sqli-in-user-authentication-module-of-futurum-software-incibe-cert-12624|Blind SQLi in Futurum Software auth module (CVE-2026-14571)]]
- [[raw/infosecwriteups.com/discovering-an-time-based-blind-sql-injection-in-a-tamil-nadu-governme-10830|Oracle Time-Based Blind SQLi in a Government Portal]]
- [[raw/infosecwriteups.com/the-devil-went-down-to-georgia-how-i-made-60k-hacking-the-dhs-15835|The Devil Went Down to Georgia: How I Made $60k Hacking the DHS]]
- [[raw/medium.com/how-i-discovered-a-blind-sql-injection-in-a-private-program-15837|How I discovered a blind SQL injection in a private program]]
- [[raw/netspi.com/second-order-sql-injection-with-stored-procedures-and-dns-based-egress-4213|Second-Order SQLi with Stored Procedures and DNS-Based Egress]]
- [[raw/osintteam.blog/time-based-blind-sql-injection-when-the-database-talks-in-seconds-15201|Time-Based Blind SQL Injection: When the Database Talks in Seconds]]
- [[raw/portswigger.net/sql-injection-cheat-sheet-web-security-academy-484|SQL injection cheat sheet (PortSwigger)]]
- [[raw/sahandbabali.com/picoctf-2026-sql-map1-writeup-15842|picoCTF 2026 SQL Map1 writeup]]
- [[raw/secjuice.com/advanced-boolean-based-sqli-filter-bypass-techniques-4215|Advanced Boolean-Based SQLi Filter Bypass Techniques]]