CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-9082
6.5

CVE-2026-9082: Unauthenticated SQL Injection in Drupal Core PostgreSQL Driver

Alon Barad
Alon Barad
Software Engineer

May 21, 2026·5 min read·37 visits

PoC Available

Executive Summary (TL;DR)

Unauthenticated SQL injection in Drupal Core's PostgreSQL driver allows full database compromise and potential remote code execution via crafted JSON:API or search queries.

Drupal Core contains a highly critical SQL injection vulnerability (CVE-2026-9082) within its Database Abstraction API. The flaw specifically affects installations using the PostgreSQL database backend, allowing unauthenticated attackers to execute arbitrary SQL commands via crafted array keys in filter parameters.

Vulnerability Overview

CVE-2026-9082 is an unauthenticated SQL Injection (CWE-89) vulnerability residing within the core architecture of Drupal. It specifically affects installations utilizing the PostgreSQL database backend. Deployments running MySQL, MariaDB, and SQLite remain unaffected by this specific attack vector due to differences in database driver implementation and syntax handling.

The flaw originates in the Database Abstraction API, particularly in how the PostgreSQL driver processes structural query components. While Drupal reliably sanitizes parameter values using prepared statements, it relies on its internal query builder to handle field names, operators, and ordering clauses. This structural construction process fails to adequately validate input derived from array keys.

Attackers exploit this validation failure by passing crafted array keys within filter parameters via standard endpoints, such as JSON:API or Core Search. The system incorporates these keys into the final SQL string without sufficient neutralization. This allows malicious actors to break out of the intended query structure and append arbitrary PostgreSQL commands.

Root Cause Analysis

The root cause of CVE-2026-9082 is the improper neutralization of special elements within array keys processed by the PostgreSQL database driver. Drupal’s abstraction layer separates data values from SQL structures to prevent injection. However, filter conditions constructed via JSON:API or Entity Queries dynamically build query clauses based on user-supplied parameter keys.

When an attacker provides a crafted key, the validation logic fails to detect PostgreSQL-specific operators. Specifically, type casting operators (::), string concatenation operators (||), and dollar-quoting mechanisms bypass the standard alphanumeric filters intended for column identifiers. The driver assumes these keys represent legitimate, safe structural components.

Because the driver directly concatenates these unsanitized keys into the SQL statement, the injected characters alter the syntax tree of the resulting query. The database engine executes the concatenated string, processing the attacker's payload as legitimate SQL commands rather than literal identifiers. This failure sequence effectively negates the protections offered by the prepared statement implementation.

Exploit Mechanics and Attack Vectors

Exploitation requires no authentication and relies on sending crafted HTTP GET requests to specific Drupal endpoints. The primary attack surfaces include the JSON:API (/jsonapi/node/article), Core Search (/search/node), and Views AJAX (/views/ajax) endpoints. These routes natively accept complex, nested array parameters for filtering and sorting operations, providing an ideal injection conduit.

Attackers typically initiate the exploit using a time-based blind SQL injection technique. By injecting the pg_sleep() function into a search parameter, the attacker verifies the vulnerability based on the server's response time. Passing a payload such as keys=test';select pg_sleep(5)-- forces the database to pause execution, providing binary confirmation of the injection point.

If the database user configured in Drupal's settings.php possesses superuser privileges, the attack escalates to Remote Code Execution (RCE). The attacker leverages the PostgreSQL COPY FROM PROGRAM command. This instructs the database engine to execute a shell command on the underlying host operating system and pipe the output into a database table.

A conceptual payload for RCE involves closing the existing query context, executing a UNION SELECT to balance the statement, and chaining the COPY command. The payload test' UNION SELECT null,null; CREATE TABLE cmd_out(output TEXT); COPY cmd_out FROM PROGRAM 'id'; -- demonstrates this exact escalation path.

Impact Assessment

The vulnerability carries a Drupal Security Risk Score of 20 out of 25, classifying it as Highly Critical. This rating reflects the unauthenticated nature of the attack and the potential for complete database compromise. NVD assigned a CVSS v3.1 base score of 6.5, which measures the direct impacts of standard SQL injection without assuming the presence of a superuser database configuration.

Successful exploitation grants the attacker read and write access to the entire Drupal database. This access enables the exfiltration of sensitive user data, session tokens, and password hashes. Attackers use this access to modify database records, granting administrative privileges to standard user accounts or altering site content.

The impact extends directly to the underlying server infrastructure if the PostgreSQL service runs with elevated privileges. Execution of shell commands via COPY FROM PROGRAM provides a definitive foothold for lateral movement within the network. This highlights the critical importance of adhering to the principle of least privilege when configuring database service accounts.

Remediation and Mitigation Guidance

The primary remediation for CVE-2026-9082 requires updating Drupal Core to a patched version. Administrators must apply version 10.4.10, 10.5.10, 10.6.9, 11.1.10, 11.2.12, or 11.3.10 depending on their active deployment branch. Updates are executed via Composer using the composer update drupal/core drupal/core-recommended command to ensure strict dependency alignment.

As a crucial defense-in-depth measure, administrators must verify the permissions assigned to the PostgreSQL user account connecting to the Drupal database. Ensure this account is strictly prohibited from holding the SUPERUSER role. Restricting database privileges neutralizes the COPY FROM PROGRAM vector, preventing escalation from SQL injection to Remote Code Execution.

Security operations teams should deploy Web Application Firewall (WAF) rules and monitor logs for indicators of compromise. Detection strategies involve searching web access logs for PostgreSQL-specific syntax such as pg_sleep, ::text, and COPY FROM PROGRAM within request parameters. Implementing targeted Sigma rules provides a baseline for identifying these attack patterns in SIEM environments.

Official Patches

DrupalOfficial Drupal Security Advisory SA-CORE-2026-004

Technical Appendix

CVSS Score
6.5/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N

Affected Systems

Drupal Core 8.9.x to 10.4.9 (with PostgreSQL)Drupal Core 10.5.0 to 10.5.9 (with PostgreSQL)Drupal Core 10.6.0 to 10.6.8 (with PostgreSQL)Drupal Core 11.0.0 to 11.1.9 (with PostgreSQL)Drupal Core 11.2.0 to 11.2.11 (with PostgreSQL)Drupal Core 11.3.0 to 11.3.9 (with PostgreSQL)

Affected Versions Detail

Product
Affected Versions
Fixed Version
Drupal Core
Drupal
8.9.0 - 10.4.910.4.10
Drupal Core
Drupal
10.5.0 - 10.5.910.5.10
Drupal Core
Drupal
10.6.0 - 10.6.810.6.9
Drupal Core
Drupal
11.0.0 - 11.1.911.1.10
Drupal Core
Drupal
11.2.0 - 11.2.1111.2.12
Drupal Core
Drupal
11.3.0 - 11.3.911.3.10
AttributeDetail
CWE IDCWE-89
Attack VectorNetwork (Unauthenticated)
CVSS v3.1 Score6.5
Drupal Risk Score20/25 (Highly Critical)
Exploit StatusPoC Available
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
CWE-89
SQL Injection

Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')

Known Exploits & Detection

GitHub (lysophavin18)Proof of Concept repository detailing exploitation techniques
GitHub (HORKimhab)Additional public Proof of Concept repository

Vulnerability Timeline

PSA-2026-05-18 announced an upcoming 'Highly Critical' security release
2026-05-18
Official advisory SA-CORE-2026-004 and CVE-2026-9082 published; patches released
2026-05-20
Multiple public PoC repositories identified on GitHub
2026-05-21

References & Sources

  • [1]Official Drupal Advisory (SA-CORE-2026-004)
  • [2]CVE-2026-9082 at CVE.org
  • [3]NVD Record
  • [4]GitHub PoC Repository (lysophavin18)
  • [5]GitHub PoC Repository (HORKimhab)

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.