CVE-2026-15741

PostgreSQL expression deparse allows SQL injection via EXTRACT argument

Published Aug 13, 2026 CVSS 3.1 · 8.8 High EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical 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.

Remediation

No solution or workaround provided in the CVE record.

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
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.
Type Values Removed Values Added
CPEs cpe:2.3:a:postgresql:postgresql:*:*:*:*:*:*:*:*
Type Values Removed Values Added
Metrics ssvc

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

Type Values Removed Values Added
First Time appeared Postgresql
Postgresql postgresql
Vendors & Products Postgresql
Postgresql postgresql
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'}

Weaknesses
  • CWE-89

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

Sources

Status
PUBLISHED
Assigner
PostgreSQL
Published
Updated
Aug 29, 2026, 11:07 PM
Reserved
Jul 14, 2026, 2:24 PM
Status
Modified
Published
Aug 13, 2026, 1:17 PM
Modified
Aug 29, 2026, 11:17 PM