Description
SQL injection in PostgreSQL EXTRACT() deparse allows an object owner to execute arbitrary SQL as a superuser via a hostile object definition. Attacks affect expression deparse consumers broadly, including pg_dump, psql commands like \sf, and any similar usage in non-core tools. Versions before PostgreSQL 18.6, 17.11, 16.15, 15.19, and 14.24 are affected.
Published: 2026-08-13
Score: 8.8 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

A SQL injection flaw exists in PostgreSQL’s EXTRACT() function deparsing logic. An object owner can define a malicious expression that, when later deparsed by utilities such as pg_dump, psql commands like \sf, or other non‑core tools, injects arbitrary SQL statements executed with superuser privileges. This classic SQL injection (CWE‑89) permits full database compromise—reading, modifying, or deleting data and disrupting services.

Affected Systems

This flaw affects PostgreSQL distributions before version 18.6, 17.11, 16.15, 15.19, and 14.24. Any component that performs expression deparse is impacted, including core utilities such as pg_dump, psql commands like \sf, and non‑core tools that rely on the same functionality.

Risk and Exploitability

The CVSS score of 8.8 indicates a high severity, and although the EPSS score is below 1 %, the vulnerability’s usage in widely deployed tools suggests a realistic exploitation probability. It is not listed in the CISA KEV catalog. The likely attack vector involves an object owner creating a hostile object definition with a crafted EXTRACT argument; when a tool or application later deparses that expression, the injected SQL is executed with superuser rights, enabling the attacker to steal or destroy data and take the database offline.

Generated by OpenCVE AI on August 30, 2026 at 00:50 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade PostgreSQL to version 18.6 or newer, or to the latest patch for your specific PostgreSQL release.
  • If an immediate upgrade is not possible, restrict object creation privileges so that only trusted users can define objects that trigger expression deparse.
  • Inspect existing object definitions for suspicious EXTRACT arguments and either remove or sanitize them before performing any dump or play‑through operations.

Generated by OpenCVE AI on August 30, 2026 at 00:50 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Debian DLA Debian DLA DLA-4740-1 postgresql-15 security update
Debian DSA Debian DSA DSA-6438-1 postgresql-17 security update
Ubuntu USN Ubuntu USN USN-8653-1 PostgreSQL vulnerabilities
History

Sat, 29 Aug 2026 23:15:00 +0000

Type Values Removed Values Added
Description SQL injection in PostgreSQL EXTRACT() deparse allows an object owner to execute arbitrary SQL as a superuser via a hostile object definition. Attacks affect expression deparse consumers broadly, including pg_dump, psql commands like \sf, and any similar usage in non-core tools. Versions before PostgreSQL 18.5, 17.11, 16.15, 15.19, and 14.24 are affected. SQL injection in PostgreSQL EXTRACT() deparse allows an object owner to execute arbitrary SQL as a superuser via a hostile object definition. Attacks affect expression deparse consumers broadly, including pg_dump, psql commands like \sf, and any similar usage in non-core tools. Versions before PostgreSQL 18.6, 17.11, 16.15, 15.19, and 14.24 are affected.

Wed, 19 Aug 2026 15:15:00 +0000

Type Values Removed Values Added
CPEs cpe:2.3:a:postgresql:postgresql:*:*:*:*:*:*:*:*

Thu, 13 Aug 2026 16:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Thu, 13 Aug 2026 15:30:00 +0000

Type Values Removed Values Added
First Time appeared Postgresql
Postgresql postgresql
Vendors & Products Postgresql
Postgresql postgresql

Thu, 13 Aug 2026 13:15:00 +0000

Type Values Removed Values Added
Description SQL injection in PostgreSQL EXTRACT() deparse allows an object owner to execute arbitrary SQL as a superuser via a hostile object definition. Attacks affect expression deparse consumers broadly, including pg_dump, psql commands like \sf, and any similar usage in non-core tools. Versions before PostgreSQL 18.5, 17.11, 16.15, 15.19, and 14.24 are affected.
Title PostgreSQL expression deparse allows SQL injection via EXTRACT argument
Weaknesses CWE-89
References
Metrics cvssV3_1

{'score': 8.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H'}


Subscriptions

Postgresql Postgresql
cve-icon MITRE

Status: PUBLISHED

Assigner: PostgreSQL

Published:

Updated: 2026-08-29T23:07:26.317Z

Reserved: 2026-07-14T14:24:10.232Z

Link: CVE-2026-15741

cve-icon Vulnrichment

Updated: 2026-08-13T15:37:43.260Z

cve-icon NVD

Status : Modified

Published: 2026-08-13T13:17:45.957

Modified: 2026-08-29T23:17:18.190

Link: CVE-2026-15741

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-30T01:00:14Z

Weaknesses
  • CWE-89

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