Anonymous users can trigger PostgreSQL-only SQL injection in Drupal core
An unauthenticated attacker can achieve SQL injection on any Drupal site using PostgreSQL by supplying crafted JSON keys.
Security & privacy Assetnote / Searchlight 21 May 2026 Disclosure Real-world evidence
Published as “Drupal Core Anonymous SQL Injection: CVE-2026-9082”
Why it matters
Drupal sites using PostgreSQL are remotely exploitable until the patched releases are deployed.
Summary
The writeup explains a critical SQL injection (CVE-2026-9082) that affects Drupal installations backed by PostgreSQL. By sending a JSON object with attacker-controlled keys to the anonymous /user/login endpoint or to a JSON:API filter, the key is interpolated into a placeholder name and ends up as raw SQL, allowing injection. The authors provide two PoCs-one POST-based login attack that triggers a division-by-zero error and one GET-based JSON:API filter that yields a PDO error-demonstrating practical exploitation, and they show that the fix consists of resetting array keys with array_values() in three core files.
What they found 2
- Two anonymous entry points (JSON login and JSON:API filter) allow attacker-controlled array keys to reach the vulnerable loop.
“There are two anonymous entry points that we have confirmed reach this loop with attacker-controlled array keys: the JSON login endpoint and the JSON:API filter syntax.”
- The vulnerability is fixed by resetting array keys with array_values() in three core files.
“The fix is three array_values() calls.”
Caveats 3
- The SQL injection only affects PostgreSQL deployments, but the same Drupal release bundles upstream Symfony and Twig security updates that apply on every backend.
- The SQL injection only affects PostgreSQL deployments; MySQL and SQLite are not exploitable.
- JSON:API is not enabled by default, but it is a common addition on Drupal sites that expose content over an API.
What’s new here 4
- First public disclosure of a PostgreSQL-only SQL injection in Drupal core.
- Two independent proof-of-concepts: a POST login attack and a GET JSON:API filter attack.
- Root cause identified as associative array keys being inserted into SQL placeholder names.
- Patch introduced three array_values() calls to normalize keys across backends.