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.
Published: 2026-08-13
Score: 8.8 High
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability arises from a flaw in PostgreSQL’s EXTRACT() expression deparse, which can be abused by an object owner to inject arbitrary SQL. The injected code runs with superuser privileges, enabling full compromise of the database system. The weakness is an instance of CWE‑89, a classic SQL injection scenario, granting attackers the ability to read, modify, or destroy data and disrupt database availability.

Affected Systems

This flaw affects PostgreSQL distributions before version 18.5, 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 not available, the vulnerability’s use in widely deployed tools suggests a realistic exploitation probability. It is not listed in the CISA KEV catalog. The likely attack vector is that an object owner creates a malicious object definition containing a crafted EXTRACT argument; when a tool or application later deparses that expression, the injected SQL is executed with superuser rights. No additional prerequisite conditions are stated, making the vulnerability broadly exploitable within any affected PostgreSQL instance where such objects exist.

Generated by OpenCVE AI on August 13, 2026 at 14:41 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade PostgreSQL to version 18.5 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 13, 2026 at 14:41 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

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-13T15:37:47.730Z

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

Link: CVE-2026-15741

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

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

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

Link: CVE-2026-15741

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-13T15:15:12Z

Weaknesses
  • CWE-89

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