CVE-2023-39417: Update to PG 14.9 and 13.12

Published Aug 1, 2023
·
Updated

An extension script is vulnerable if it uses @extowner@, @extschema@, or @extschema:...@ inside a quoting construct (dollar quoting, '', or ""). No bundled extension is vulnerable. Vulnerable uses do appear in a documentation example and in non-bundled extensions. Hence, the attack prerequisite is an administrator having installed files of a vulnerable, trusted, non-bundled extension. Subject to that prerequisite, this enables an attacker having database-level CREATE privilege to execute arbitrary code as the bootstrap superuser. PostgreSQL will block this attack in the core server, so there's no need to modify individual extensions.

Supported, Vulnerable Versions: 11 - 15.

Other sources

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.

Launchpad

PostgreSQL could allow a remote authenticated attacker to execute arbitrary code on the system, caused by a flaw in the extension script. By sending a specially crafted request using @extowner@, @extschema@, or @extschema:...@ inside a quoting construct, an attacker could exploit this vulnerability to execute arbitrary code as the bootstrap superuser.

IBM

PostgreSQL has been updated to 14.9 and 13.12 to mitigate CVE-2023-39417.

GitLab

Affected Software

18 affected componentsFixes available
redhat/postgresql<11.21
11.21
redhat/postgresql<12.16
12.16
redhat/postgresql<13.12
13.12
redhat/postgresql<14.9
14.9
redhat/postgresql<15.4
15.4
debian/postgresql-13
13.16-0+deb11u1
debian/postgresql-15
15.8-0+deb12u1
PostgreSQL postgresql>=11.0<11.21
PostgreSQL postgresql>=12.0<12.16
PostgreSQL postgresql>=13.0<13.12
PostgreSQL postgresql>=14.0<14.9
PostgreSQL postgresql>=15.0<15.4
redhat Software Collections
redhat Enterprise Linux=8.0
redhat Enterprise Linux=9.0
Debian Debian Linux=8.0
Debian Debian Linux=11.0
Debian Debian Linux=12.0

Event History

Aug 1, 2023
Data Sourced
via Red Hat·12:31 PM
DescriptionSeverityAffected Software
Aug 11, 2023
CVE Published
via MITRE·12:19 PM
Data Sourced
via MITRE·12:19 PM
DescriptionSeverityWeakness
Feb 1, 2024
Data Sourced
via Launchpad·12:30 AM
Description
Feb 2, 2024
Data Sourced
via IBM·12:00 AM
DescriptionSeverityAffected Software
Sep 16, 2024
Data Sourced
via Ubuntu·04:16 AM
RemedyDescriptionSeverityAffected Software
Apr 22, 2026
Data Sourced
via GitLab·08:52 AM
Description

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the vulnerability ID?

The vulnerability ID is CVE-2023-39417.

2

What is the severity of CVE-2023-39417?

The severity of CVE-2023-39417 is high.

3

Which software is affected by CVE-2023-39417?

PostgreSQL versions 11.0 to 15.4 are affected by CVE-2023-39417.

4

How does the SQL Injection vulnerability in PostgreSQL occur?

The SQL Injection vulnerability occurs when PostgreSQL uses @extowner@, @extschema@, or @extschema:...@ inside a quoting construct (dollar quoting, '', or ").

5

Are there any remedies available for CVE-2023-39417?

Yes, there are remedies available for CVE-2023-39417. Please refer to the official sources for more information.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203