CVE-2023-39417

published 11 Aug 2023 · updated 6 Nov 2026

Postgresql: extension script @substitutions@ within quoting allow sql injection

7.5HighCVSS 7.5EPSS 2%

No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 2%. Fixed in 11.21, 15.4, 14.9 and 2 more.

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.

Affected

Vendors, products and packages with version ranges

VendorProductVersionsFixed
Red HatAdvanced Cluster Security
Red HatEnterprise Linux
Red HatRHACS-3.74-RHEL-8
Red HatRHACS-4.1-RHEL-8
Red HatSoftware Collections
debiandebian_linux=8.0, =12.0, =11.0
postgresqlpostgresql>=11.0 <11.21, >=15.0 <15.4, >=14.0 <14.9, >=13.0 <13.12, >=12.0 <12.1611.21, 15.4, 14.9, 13.12, 12.16
redhatenterprise_linux=8.0, =9.0
redhatsoftware_collections

Exploit evidence

1 public sources

Vendor advisories

Timeline

Every event on this vulnerability

Related

Other vulnerabilities in Red Hat, strongest first

Embed

A live severity badge for an advisory, README or ticket

CVE-2023-39417 severity on Zeptric[![CVE-2023-39417](https://zeptric.io/badge/cve/CVE-2023-39417.svg)](https://zeptric.io/cve/CVE-2023-39417)