CVE-2023-39417

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

HIGH
8.8
CVSS Score
Published: August 11, 2023 at 12:19 PM UTC
Updated: November 1, 2026 at 04:18 AM UTC
4 products affected across 3 vendorsDebian LinuxEnterprise LinuxPostgreSQL

Using Red Hat Advanced Cluster Security 4.2 by Red Hat?

Get instant alerts when new vulnerabilities affect Red Hat Advanced Cluster Security 4.2 - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH8.8
Exploit prediction
EPSS 2%
SSVC
No known exploit

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

11.0 ≤ v < 11.2112.0 ≤ v < 12.1613.0 ≤ v < 13.1214.0 ≤ v < 14.915.0 ≤ v < 15.4
Affected range stops below 11.21, so it looks safe — our inference, not a vendor statement
Affected range stops below 12.16, so it looks safe — our inference, not a vendor statement
Affected range stops below 13.12, so it looks safe — our inference, not a vendor statement
Affected range stops below 14.9, so it looks safe — our inference, not a vendor statement
Affected range stops below 15.4, so it looks safe — our inference, not a vendor statement
Vendor states this is fixed in 0:13.13-1.el9_0 (unaffected)
Vendor states this is fixed in 0:13.13-1.el9_2 (unaffected)
Vendor states this is fixed in 0:13.13-1.el9_3 (unaffected)
Vendor states this is fixed in 8 (unaffected)
Vendor states this is fixed in 8020020231128165246.4cda2c84 (unaffected)
Vendor states this is fixed in 8040020231127153301.522a0ee4 (unaffected)
Vendor states this is fixed in 8040020231127154806.522a0ee4 (unaffected)
Vendor states this is fixed in 8060020231114115246.ad008a3a (unaffected)
Vendor states this is fixed in 8060020231128165328.ad008a3a (unaffected)
Vendor states this is fixed in 8080020231113134015.63b34585 (unaffected)
Vendor states this is fixed in 8080020231114105206.63b34585 (unaffected)
Vendor states this is fixed in 8080020231128165335.63b34585 (unaffected)
Vendor states this is fixed in 8090020231114113548.a75119d5 (unaffected)
Vendor states this is fixed in 8090020231114113712.a75119d5 (unaffected)
Vendor states this is fixed in 8090020231128173330.a75119d5 (unaffected)
Vendor states this is fixed in 9020020231115020618.rhel9 (unaffected)
Vendor states this is fixed in 9030020231120082734.rhel9 (unaffected)
Vendor states this is fixed in 6 (unknown)
Vendor states this is fixed in 7 (unknown)
All versions
Vendor states this is fixed in 0:12.17-1.el7 (unaffected)
Vendor states this is fixed in 0:13.13-1.el7 (unaffected)

References (29)

Vendor Advisoryx_refsource_REDHATThird Party Advisory
https://access.redhat.com/errata/RHSA-2023:7545
Vendor Advisoryx_refsource_REDHATThird Party Advisory
https://access.redhat.com/errata/RHSA-2023:7579
Vendor Advisoryx_refsource_REDHATThird Party Advisory
https://access.redhat.com/errata/RHSA-2023:7580
Vendor Advisoryx_refsource_REDHATThird Party Advisory
https://access.redhat.com/errata/RHSA-2023:7581
Vendor Advisoryx_refsource_REDHATThird Party Advisory
https://access.redhat.com/errata/RHSA-2023:7616
Vendor Advisoryx_refsource_REDHATThird Party Advisory
https://access.redhat.com/errata/RHSA-2023:7656
Vendor Advisoryx_refsource_REDHATThird Party Advisory
https://access.redhat.com/errata/RHSA-2023:7666
Vendor Advisoryx_refsource_REDHATThird Party Advisory
https://access.redhat.com/errata/RHSA-2023:7667

SSVC — Action Prioritization

SSVCNo known exploitNot automatableTotal impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
NETWORK
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-89

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card