CVE-2023-39417

Executive Summary

CVE-2023-39417 exposes a SQL injection flaw in PostgreSQL extension scripts that use @extowner@, @extschema@, or @extschema:…@ within quoted strings. An attacker with database-level CREATE rights can inject malicious SQL, causing execution as the bootstrap superuser and enabling full system compromise. This vulnerability is not yet listed in CISA KEV.


Authoritative CVE Metadata - CVSS Base Score: 7.5 (HIGH) - Published: 2023-08-11T13:15:09.870 - Last Modified: 2026-09-30T20:17:12.770

Original Description: IN THE EXTENSION SCRIPT, a SQL Injection vulnerability was found in PostgreSQL if it uses @extowner@, @extschema@, or @extschema:...@ inside a quoting construct (dollar quoting, '', or ""). If an administrator has installed files of a vulnerable, trusted, non-bundled extension, an attacker with database-level CREATE privilege can execute arbitrary code as the bootstrap superuser.

"Fortune favours the brave."

— Virgil
Source: NVD