CVE-2026-15741 PUBLISHED

PostgreSQL expression deparse allows SQL injection via EXTRACT argument

Assigner: PostgreSQL
Reserved: 14.07.2026 Published: 13.08.2026 Updated: 13.08.2026

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.

Metrics

CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
CVSS Score: 8.8

Product Status

Vendor n/a
Product PostgreSQL
Versions Default: unaffected
  • affected from 18 to 18.5 (excl.)
  • affected from 17 to 17.11 (excl.)
  • affected from 16 to 16.15 (excl.)
  • affected from 15 to 15.19 (excl.)
  • affected from 0 to 14.24 (excl.)

Affected Configurations

attacker has permission to create non-temporary objects in at least one schema

Credits

  • The PostgreSQL project thanks Ben Morris (Claude and Anthropic Research) for reporting this problem.

References

Problem Types

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