SQL injection in PostgreSQL EXTRACT() deparse allows an object owner to execute arbitrary SQL as a superuser via a hostile object definition
Description
SQL injection in PostgreSQL EXTRACT() deparse allows an object owner to execute arbitrary SQL as a superuser via a hostile object definition
AI Analyst Comment
Remediation
Apply vendor patches immediately. Review database access controls and enable query logging.
---METADATA---
VENDOR: PostgreSQL
PRODUCT: PostgreSQL
AFFECTED_VERSIONS: 18 up to 18.5, 17 up to 17.11, 16 up to 16.15, 15 up to 15.19, 0 up to 14.24
CONFIDENCE: high
MISSING: none
---END_METADATA---
Description Summary:
A SQL injection vulnerability in the PostgreSQL EXTRACT function allows an object owner to execute arbitrary SQL commands as a superuser.
Executive Summary:
A critical SQL injection vulnerability in PostgreSQL allows privilege escalation by object owners, potentially granting them superuser control over the entire database instance.
Vulnerability Details
CVE-ID: CVE-2026-15741
Affected Software: PostgreSQL
Affected Versions: 18 (pre-18.5), 17 (pre-17.11), 16 (pre-16.15), 15 (pre-15.19), and 14 (pre-14.24)
Vulnerability: This is a classic SQL injection vulnerability (CWE-89) found within the EXTRACT function deparse mechanism. It allows a user who already possesses object ownership to execute malicious SQL, effectively elevating their privileges to superuser status.
Business Impact
The ability to escalate privileges to superuser allows an attacker to bypass all database security controls, potentially resulting in complete data theft, modification, or destruction. With a CVSS score of 8.8, this vulnerability poses a severe threat to the integrity and confidentiality of any application relying on the affected PostgreSQL versions.
Remediation Plan
Immediate Action: Apply the vendor-provided security patches by upgrading to the latest minor version for the respective major release (e.g., 18.5, 17.11, etc.).
Proactive Monitoring: Review database audit logs for anomalous SQL commands, specifically those involving the EXTRACT function or attempts to modify sensitive system objects.
Compensating Controls: Restrict the ability of users to create or define new objects if they do not strictly require such privileges, and enforce the principle of least privilege for all database accounts.
Exploitation Status
Public Exploit Available: Unknown.
Analyst Notes: As of August 14, 2026, there is no public information indicating active exploitation or a public proof-of-concept for this vulnerability. Privilege escalation flaws in foundational database software are high-value targets for attackers.
Analyst Recommendation
Database administrators should treat this update with the highest urgency. Upgrade cycles for database engines should be accelerated to address this privilege escalation risk, ensuring that superuser access remains strictly controlled and monitored.