Vulnerability · Published Aug 11, 2023 · Assigned by redhat

CVE-2023-39417Postgresql: extension script @substitutions@ within quoting allow sql injection

High 7.5

In plain English

A high-severity SQL injection in Red Hat Advanced Cluster Security 4.2 from Red Hat. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 1.7% (higher than 77% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)7.5High
Exploit odds (30 days)1.7%top 23.0% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official 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 packages & fixed versions

EcosystemPackageFixed inAdvisory
AlmaLinux:8pg_repack1.4.6-3.module_el8.6.0+3095+ee60d910ALSA-2023:7581
AlmaLinux:8pg_repack1.4.6-3.module_el8.6.0+2758+4f4474dfALSA-2023:7714
AlmaLinux:8pg_repack1.4.6-3.module_el8.6.0+3094+eb237fb8ALSA-2023:7714
AlmaLinux:8pg_repack1.4.6-3.module_el8.6.0+2760+1746ec94ALSA-2023:7581
AlmaLinux:8pg_repack1.4.8-1.module_el8.8.0+3487+43ec1b9fALSA-2023:7884
AlmaLinux:9pg_repack1.4.8-1.module_el9.2.0+22+09653793ALSA-2023:7785
AlmaLinux:8pgaudit1.5.0-1.module_el8.6.0+3095+ee60d910ALSA-2023:7581
AlmaLinux:8pgaudit1.4.0-5.module_el8.6.0+2758+4f4474dfALSA-2023:7714
AlmaLinux:8pgaudit1.4.0-5.module_el8.6.0+3094+eb237fb8ALSA-2023:7714
AlmaLinux:8pgaudit1.5.0-1.module_el8.6.0+2760+1746ec94ALSA-2023:7581
AlmaLinux:8pgaudit1.7.0-1.module_el8.8.0+3487+43ec1b9fALSA-2023:7884
AlmaLinux:9pgaudit1.7.0-1.module_el9.2.0+22+09653793ALSA-2023:7785
AlmaLinux:8postgres-decoderbufs0.10.0-2.module_el8.6.0+3095+ee60d910ALSA-2023:7581
AlmaLinux:8postgres-decoderbufs0.10.0-2.module_el8.6.0+2760+1746ec94ALSA-2023:7581
AlmaLinux:8postgres-decoderbufs0.10.0-2.module_el8.6.0+3094+eb237fb8ALSA-2023:7714
AlmaLinux:8postgres-decoderbufs1.9.7-1.Final.module_el8.8.0+3487+43ec1b9fALSA-2023:7884
AlmaLinux:8postgres-decoderbufs0.10.0-2.module_el8.6.0+2758+4f4474dfALSA-2023:7714
AlmaLinux:9postgres-decoderbufs1.9.7-1.Final.module_el9.2.0+22+09653793ALSA-2023:7785
AlmaLinux:8postgresql12.17-1.module_el8.9.0+3704+f1f917ceALSA-2023:7714
AlmaLinux:8postgresql13.13-1.module_el8.9.0+3692+8714f643ALSA-2023:7581
AlmaLinux:8postgresql15.5-1.module_el8.9.0+3706+885c732eALSA-2023:7884
AlmaLinux:9postgresql15.5-1.module_el9.3.0+52+21733919ALSA-2023:7785
AlmaLinux:9postgresql13.13-1.el9_3ALSA-2023:7784
AlmaLinux:8postgresql-contrib15.5-1.module_el8.9.0+3706+885c732eALSA-2023:7884
AlmaLinux:8postgresql-contrib13.13-1.module_el8.9.0+3692+8714f643ALSA-2023:7581
AlmaLinux:8postgresql-contrib12.17-1.module_el8.9.0+3704+f1f917ceALSA-2023:7714
AlmaLinux:9postgresql-contrib13.13-1.el9_3ALSA-2023:7784
AlmaLinux:9postgresql-contrib15.5-1.module_el9.3.0+52+21733919ALSA-2023:7785
AlmaLinux:8postgresql-docs12.17-1.module_el8.9.0+3704+f1f917ceALSA-2023:7714
AlmaLinux:8postgresql-docs15.5-1.module_el8.9.0+3706+885c732eALSA-2023:7884
AlmaLinux:8postgresql-docs13.13-1.module_el8.9.0+3692+8714f643ALSA-2023:7581
AlmaLinux:9postgresql-docs15.5-1.module_el9.3.0+52+21733919ALSA-2023:7785
AlmaLinux:9postgresql-docs13.13-1.el9_3ALSA-2023:7784
AlmaLinux:8postgresql-plperl15.5-1.module_el8.9.0+3706+885c732eALSA-2023:7884
AlmaLinux:8postgresql-plperl12.17-1.module_el8.9.0+3704+f1f917ceALSA-2023:7714
AlmaLinux:8postgresql-plperl13.13-1.module_el8.9.0+3692+8714f643ALSA-2023:7581
AlmaLinux:9postgresql-plperl15.5-1.module_el9.3.0+52+21733919ALSA-2023:7785
AlmaLinux:9postgresql-plperl13.13-1.el9_3ALSA-2023:7784
AlmaLinux:8postgresql-plpython312.17-1.module_el8.9.0+3704+f1f917ceALSA-2023:7714
AlmaLinux:8postgresql-plpython315.5-1.module_el8.9.0+3706+885c732eALSA-2023:7884
AlmaLinux:8postgresql-plpython313.13-1.module_el8.9.0+3692+8714f643ALSA-2023:7581
AlmaLinux:9postgresql-plpython315.5-1.module_el9.3.0+52+21733919ALSA-2023:7785
AlmaLinux:9postgresql-plpython313.13-1.el9_3ALSA-2023:7784
AlmaLinux:8postgresql-pltcl15.5-1.module_el8.9.0+3706+885c732eALSA-2023:7884
AlmaLinux:8postgresql-pltcl12.17-1.module_el8.9.0+3704+f1f917ceALSA-2023:7714
AlmaLinux:8postgresql-pltcl13.13-1.module_el8.9.0+3692+8714f643ALSA-2023:7581
AlmaLinux:9postgresql-pltcl13.13-1.el9_3ALSA-2023:7784
AlmaLinux:9postgresql-pltcl15.5-1.module_el9.3.0+52+21733919ALSA-2023:7785
AlmaLinux:8postgresql-private-devel15.5-1.module_el8.9.0+3706+885c732eALSA-2023:7884
AlmaLinux:9postgresql-private-devel13.13-1.el9_3ALSA-2023:7784
AlmaLinux:9postgresql-private-devel15.5-1.module_el9.3.0+52+21733919ALSA-2023:7785
AlmaLinux:8postgresql-private-libs15.5-1.module_el8.9.0+3706+885c732eALSA-2023:7884
AlmaLinux:9postgresql-private-libs13.13-1.el9_3ALSA-2023:7784
AlmaLinux:9postgresql-private-libs15.5-1.module_el9.3.0+52+21733919ALSA-2023:7785
AlmaLinux:8postgresql-server13.13-1.module_el8.9.0+3692+8714f643ALSA-2023:7581
AlmaLinux:8postgresql-server12.17-1.module_el8.9.0+3704+f1f917ceALSA-2023:7714
AlmaLinux:8postgresql-server15.5-1.module_el8.9.0+3706+885c732eALSA-2023:7884
AlmaLinux:9postgresql-server15.5-1.module_el9.3.0+52+21733919ALSA-2023:7785
AlmaLinux:9postgresql-server13.13-1.el9_3ALSA-2023:7784
AlmaLinux:8postgresql-server-devel12.17-1.module_el8.9.0+3704+f1f917ceALSA-2023:7714
AlmaLinux:8postgresql-server-devel15.5-1.module_el8.9.0+3706+885c732eALSA-2023:7884
AlmaLinux:8postgresql-server-devel13.13-1.module_el8.9.0+3692+8714f643ALSA-2023:7581
AlmaLinux:9postgresql-server-devel15.5-1.module_el9.3.0+52+21733919ALSA-2023:7785
AlmaLinux:9postgresql-server-devel13.13-1.el9_3ALSA-2023:7784
AlmaLinux:8postgresql-static15.5-1.module_el8.9.0+3706+885c732eALSA-2023:7884
AlmaLinux:8postgresql-static12.17-1.module_el8.9.0+3704+f1f917ceALSA-2023:7714
AlmaLinux:8postgresql-static13.13-1.module_el8.9.0+3692+8714f643ALSA-2023:7581
AlmaLinux:9postgresql-static15.5-1.module_el9.3.0+52+21733919ALSA-2023:7785
AlmaLinux:9postgresql-static13.13-1.el9_3ALSA-2023:7784
AlmaLinux:8postgresql-test15.5-1.module_el8.9.0+3706+885c732eALSA-2023:7884
AlmaLinux:8postgresql-test13.13-1.module_el8.9.0+3692+8714f643ALSA-2023:7581
AlmaLinux:8postgresql-test12.17-1.module_el8.9.0+3704+f1f917ceALSA-2023:7714
AlmaLinux:9postgresql-test13.13-1.el9_3ALSA-2023:7784
AlmaLinux:9postgresql-test15.5-1.module_el9.3.0+52+21733919ALSA-2023:7785
AlmaLinux:8postgresql-test-rpm-macros15.5-1.module_el8.9.0+3706+885c732eALSA-2023:7884
AlmaLinux:8postgresql-test-rpm-macros12.17-1.module_el8.9.0+3704+f1f917ceALSA-2023:7714
AlmaLinux:8postgresql-test-rpm-macros13.13-1.module_el8.9.0+3692+8714f643ALSA-2023:7581
AlmaLinux:9postgresql-test-rpm-macros15.5-1.module_el9.3.0+52+21733919ALSA-2023:7785
AlmaLinux:8postgresql-upgrade15.5-1.module_el8.9.0+3706+885c732eALSA-2023:7884
AlmaLinux:8postgresql-upgrade13.13-1.module_el8.9.0+3692+8714f643ALSA-2023:7581
AlmaLinux:8postgresql-upgrade12.17-1.module_el8.9.0+3704+f1f917ceALSA-2023:7714
AlmaLinux:9postgresql-upgrade13.13-1.el9_3ALSA-2023:7784
AlmaLinux:9postgresql-upgrade15.5-1.module_el9.3.0+52+21733919ALSA-2023:7785
AlmaLinux:8postgresql-upgrade-devel12.17-1.module_el8.9.0+3704+f1f917ceALSA-2023:7714
AlmaLinux:8postgresql-upgrade-devel15.5-1.module_el8.9.0+3706+885c732eALSA-2023:7884
AlmaLinux:8postgresql-upgrade-devel13.13-1.module_el8.9.0+3692+8714f643ALSA-2023:7581
AlmaLinux:9postgresql-upgrade-devel15.5-1.module_el9.3.0+52+21733919ALSA-2023:7785
AlmaLinux:9postgresql-upgrade-devel13.13-1.el9_3ALSA-2023:7784
Alpine:v3.20postgresql1414.9-r0ALPINE-CVE-2023-39417
Alpine:v3.20postgresql1515.4-r0ALPINE-CVE-2023-39417
Alpine:v3.21postgresql1515.4-r0ALPINE-CVE-2023-39417
Alpine:v3.22postgresql1515.4-r0ALPINE-CVE-2023-39417
Debian:12pgextwlist1.15-2+deb12u1DEBIAN-CVE-2023-39417
Debian:13pgextwlist1.19-1+deb13u1DEBIAN-CVE-2023-39417
Debian:14pgextwlist1.20-1DEBIAN-CVE-2023-39417
Debian:12postgresql-1515.5-0+deb12u1DEBIAN-CVE-2023-39417
Debian:12postgresql-1515.5-0+deb12u1DSA-5553-1
Rocky Linux:8pg_repack0:1.4.8-1.module+el8.10.0+1858+fcc46a79RLSA-2023:7884
Rocky Linux:8pg_repack0:1.4.6-3.module+el8.5.0+684+c3892ef9RLSA-2023:7581
Rocky Linux:8pg_repack0:1.4.6-3.module+el8.5.0+684+c3892ef9RLSA-2023:7714
Rocky Linux:8pg_repack0:1.4.8-1.module+el8.9.0+1525+fc91df60RLSA-2023:7884
Rocky Linux:8pg_repack0:1.4.8-1.module+el8.10.0+40056+df351139RLSA-2023:7884
Rocky Linux:8pg_repack0:1.4.8-1.module+el8.10.0+1622+bd25b19cRLSA-2023:7884
Rocky Linux:8pgaudit0:1.5.0-1.module+el8.8.0+1443+0e26d3b2RLSA-2023:7581
Rocky Linux:8pgaudit0:1.4.0-5.module+el8.9.0+1331+6f33d496RLSA-2023:7714
Rocky Linux:8pgaudit0:1.7.0-1.module+el8.10.0+40056+df351139RLSA-2023:7884
Rocky Linux:8pgaudit0:1.7.0-1.module+el8.9.0+1525+fc91df60RLSA-2023:7884
Rocky Linux:9pgaudit0:1.7.0-1.module+el9.5.0+30637+4391fccaRLSA-2023:7785
Rocky Linux:8postgres-decoderbufs0:1.9.7-1.Final.module+el8.9.0+1525+fc91df60RLSA-2023:7884
Rocky Linux:8postgres-decoderbufs0:1.9.7-1.Final.module+el8.10.0+40056+df351139RLSA-2023:7884
Rocky Linux:8postgres-decoderbufs0:0.10.0-2.module+el8.5.0+684+c3892ef9RLSA-2023:7581
Rocky Linux:8postgres-decoderbufs0:0.10.0-2.module+el8.5.0+684+c3892ef9RLSA-2023:7714
Rocky Linux:9postgres-decoderbufs0:1.9.7-1.Final.module+el9.5.0+30637+4391fccaRLSA-2023:7785
Rocky Linux:8postgresql0:12.17-1.module+el8.9.0+1603+444d1b54RLSA-2023:7714
Rocky Linux:8postgresql0:13.13-1.module+el8.9.0+1593+6cfc6c10RLSA-2023:7581
Ubuntu:22.04:LTSpostgresql-1414.9-0ubuntu0.22.04.1UBUNTU-CVE-2023-39417
Ubuntu:22.04:LTSpostgresql-1414.9-0ubuntu0.22.04.1USN-6296-1

Affected products (as reported)

VendorProductVersions
Red Hat Red Hat Advanced Cluster Security 4.2 see references
Red Hat Red Hat Advanced Cluster Security 4.2 see references
Red Hat Red Hat Advanced Cluster Security 4.2 see references
Red Hat Red Hat Advanced Cluster Security 4.2 see references
Red Hat Red Hat Advanced Cluster Security 4.2 see references
Red Hat Red Hat Enterprise Linux 8 see references
Red Hat Red Hat Enterprise Linux 8 see references
Red Hat Red Hat Enterprise Linux 8 see references
Red Hat Red Hat Enterprise Linux 8.2 Advanced Update Support see references
Red Hat Red Hat Enterprise Linux 8.2 Telecommunications Update Service see references
Red Hat Red Hat Enterprise Linux 8.2 Update Services for SAP Solutions see references
Red Hat Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support see references
Red Hat Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support see references
Red Hat Red Hat Enterprise Linux 8.4 Telecommunications Update Service see references
Red Hat Red Hat Enterprise Linux 8.4 Telecommunications Update Service see references
Red Hat Red Hat Enterprise Linux 8.4 Update Services for SAP Solutions see references
Red Hat Red Hat Enterprise Linux 8.4 Update Services for SAP Solutions see references
Red Hat Red Hat Enterprise Linux 8.6 Extended Update Support see references
Red Hat Red Hat Enterprise Linux 8.6 Extended Update Support see references
Red Hat Red Hat Enterprise Linux 8.8 Extended Update Support see references
Red Hat Red Hat Enterprise Linux 8.8 Extended Update Support see references
Red Hat Red Hat Enterprise Linux 8.8 Extended Update Support see references
Red Hat Red Hat Enterprise Linux 9 see references
Red Hat Red Hat Enterprise Linux 9 see references
Red Hat Red Hat Enterprise Linux 9.0 Extended Update Support see references
Red Hat Red Hat Enterprise Linux 9.2 Extended Update Support see references
Red Hat Red Hat Enterprise Linux 9.2 Extended Update Support see references
Red Hat Red Hat Software Collections for Red Hat Enterprise Linux 7 see references
Red Hat Red Hat Software Collections for Red Hat Enterprise Linux 7 see references
Red Hat RHACS-3.74-RHEL-8 see references

Weakness: CWE-89 · Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

References