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.
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
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux:8 | pg_repack | 1.4.6-3.module_el8.6.0+3095+ee60d910 | ALSA-2023:7581 |
| AlmaLinux:8 | pg_repack | 1.4.6-3.module_el8.6.0+2758+4f4474df | ALSA-2023:7714 |
| AlmaLinux:8 | pg_repack | 1.4.6-3.module_el8.6.0+3094+eb237fb8 | ALSA-2023:7714 |
| AlmaLinux:8 | pg_repack | 1.4.6-3.module_el8.6.0+2760+1746ec94 | ALSA-2023:7581 |
| AlmaLinux:8 | pg_repack | 1.4.8-1.module_el8.8.0+3487+43ec1b9f | ALSA-2023:7884 |
| AlmaLinux:9 | pg_repack | 1.4.8-1.module_el9.2.0+22+09653793 | ALSA-2023:7785 |
| AlmaLinux:8 | pgaudit | 1.5.0-1.module_el8.6.0+3095+ee60d910 | ALSA-2023:7581 |
| AlmaLinux:8 | pgaudit | 1.4.0-5.module_el8.6.0+2758+4f4474df | ALSA-2023:7714 |
| AlmaLinux:8 | pgaudit | 1.4.0-5.module_el8.6.0+3094+eb237fb8 | ALSA-2023:7714 |
| AlmaLinux:8 | pgaudit | 1.5.0-1.module_el8.6.0+2760+1746ec94 | ALSA-2023:7581 |
| AlmaLinux:8 | pgaudit | 1.7.0-1.module_el8.8.0+3487+43ec1b9f | ALSA-2023:7884 |
| AlmaLinux:9 | pgaudit | 1.7.0-1.module_el9.2.0+22+09653793 | ALSA-2023:7785 |
| AlmaLinux:8 | postgres-decoderbufs | 0.10.0-2.module_el8.6.0+3095+ee60d910 | ALSA-2023:7581 |
| AlmaLinux:8 | postgres-decoderbufs | 0.10.0-2.module_el8.6.0+2760+1746ec94 | ALSA-2023:7581 |
| AlmaLinux:8 | postgres-decoderbufs | 0.10.0-2.module_el8.6.0+3094+eb237fb8 | ALSA-2023:7714 |
| AlmaLinux:8 | postgres-decoderbufs | 1.9.7-1.Final.module_el8.8.0+3487+43ec1b9f | ALSA-2023:7884 |
| AlmaLinux:8 | postgres-decoderbufs | 0.10.0-2.module_el8.6.0+2758+4f4474df | ALSA-2023:7714 |
| AlmaLinux:9 | postgres-decoderbufs | 1.9.7-1.Final.module_el9.2.0+22+09653793 | ALSA-2023:7785 |
| AlmaLinux:8 | postgresql | 12.17-1.module_el8.9.0+3704+f1f917ce | ALSA-2023:7714 |
| AlmaLinux:8 | postgresql | 13.13-1.module_el8.9.0+3692+8714f643 | ALSA-2023:7581 |
| AlmaLinux:8 | postgresql | 15.5-1.module_el8.9.0+3706+885c732e | ALSA-2023:7884 |
| AlmaLinux:9 | postgresql | 15.5-1.module_el9.3.0+52+21733919 | ALSA-2023:7785 |
| AlmaLinux:9 | postgresql | 13.13-1.el9_3 | ALSA-2023:7784 |
| AlmaLinux:8 | postgresql-contrib | 15.5-1.module_el8.9.0+3706+885c732e | ALSA-2023:7884 |
| AlmaLinux:8 | postgresql-contrib | 13.13-1.module_el8.9.0+3692+8714f643 | ALSA-2023:7581 |
| AlmaLinux:8 | postgresql-contrib | 12.17-1.module_el8.9.0+3704+f1f917ce | ALSA-2023:7714 |
| AlmaLinux:9 | postgresql-contrib | 13.13-1.el9_3 | ALSA-2023:7784 |
| AlmaLinux:9 | postgresql-contrib | 15.5-1.module_el9.3.0+52+21733919 | ALSA-2023:7785 |
| AlmaLinux:8 | postgresql-docs | 12.17-1.module_el8.9.0+3704+f1f917ce | ALSA-2023:7714 |
| AlmaLinux:8 | postgresql-docs | 15.5-1.module_el8.9.0+3706+885c732e | ALSA-2023:7884 |
| AlmaLinux:8 | postgresql-docs | 13.13-1.module_el8.9.0+3692+8714f643 | ALSA-2023:7581 |
| AlmaLinux:9 | postgresql-docs | 15.5-1.module_el9.3.0+52+21733919 | ALSA-2023:7785 |
| AlmaLinux:9 | postgresql-docs | 13.13-1.el9_3 | ALSA-2023:7784 |
| AlmaLinux:8 | postgresql-plperl | 15.5-1.module_el8.9.0+3706+885c732e | ALSA-2023:7884 |
| AlmaLinux:8 | postgresql-plperl | 12.17-1.module_el8.9.0+3704+f1f917ce | ALSA-2023:7714 |
| AlmaLinux:8 | postgresql-plperl | 13.13-1.module_el8.9.0+3692+8714f643 | ALSA-2023:7581 |
| AlmaLinux:9 | postgresql-plperl | 15.5-1.module_el9.3.0+52+21733919 | ALSA-2023:7785 |
| AlmaLinux:9 | postgresql-plperl | 13.13-1.el9_3 | ALSA-2023:7784 |
| AlmaLinux:8 | postgresql-plpython3 | 12.17-1.module_el8.9.0+3704+f1f917ce | ALSA-2023:7714 |
| AlmaLinux:8 | postgresql-plpython3 | 15.5-1.module_el8.9.0+3706+885c732e | ALSA-2023:7884 |
| AlmaLinux:8 | postgresql-plpython3 | 13.13-1.module_el8.9.0+3692+8714f643 | ALSA-2023:7581 |
| AlmaLinux:9 | postgresql-plpython3 | 15.5-1.module_el9.3.0+52+21733919 | ALSA-2023:7785 |
| AlmaLinux:9 | postgresql-plpython3 | 13.13-1.el9_3 | ALSA-2023:7784 |
| AlmaLinux:8 | postgresql-pltcl | 15.5-1.module_el8.9.0+3706+885c732e | ALSA-2023:7884 |
| AlmaLinux:8 | postgresql-pltcl | 12.17-1.module_el8.9.0+3704+f1f917ce | ALSA-2023:7714 |
| AlmaLinux:8 | postgresql-pltcl | 13.13-1.module_el8.9.0+3692+8714f643 | ALSA-2023:7581 |
| AlmaLinux:9 | postgresql-pltcl | 13.13-1.el9_3 | ALSA-2023:7784 |
| AlmaLinux:9 | postgresql-pltcl | 15.5-1.module_el9.3.0+52+21733919 | ALSA-2023:7785 |
| AlmaLinux:8 | postgresql-private-devel | 15.5-1.module_el8.9.0+3706+885c732e | ALSA-2023:7884 |
| AlmaLinux:9 | postgresql-private-devel | 13.13-1.el9_3 | ALSA-2023:7784 |
| AlmaLinux:9 | postgresql-private-devel | 15.5-1.module_el9.3.0+52+21733919 | ALSA-2023:7785 |
| AlmaLinux:8 | postgresql-private-libs | 15.5-1.module_el8.9.0+3706+885c732e | ALSA-2023:7884 |
| AlmaLinux:9 | postgresql-private-libs | 13.13-1.el9_3 | ALSA-2023:7784 |
| AlmaLinux:9 | postgresql-private-libs | 15.5-1.module_el9.3.0+52+21733919 | ALSA-2023:7785 |
| AlmaLinux:8 | postgresql-server | 13.13-1.module_el8.9.0+3692+8714f643 | ALSA-2023:7581 |
| AlmaLinux:8 | postgresql-server | 12.17-1.module_el8.9.0+3704+f1f917ce | ALSA-2023:7714 |
| AlmaLinux:8 | postgresql-server | 15.5-1.module_el8.9.0+3706+885c732e | ALSA-2023:7884 |
| AlmaLinux:9 | postgresql-server | 15.5-1.module_el9.3.0+52+21733919 | ALSA-2023:7785 |
| AlmaLinux:9 | postgresql-server | 13.13-1.el9_3 | ALSA-2023:7784 |
| AlmaLinux:8 | postgresql-server-devel | 12.17-1.module_el8.9.0+3704+f1f917ce | ALSA-2023:7714 |
| AlmaLinux:8 | postgresql-server-devel | 15.5-1.module_el8.9.0+3706+885c732e | ALSA-2023:7884 |
| AlmaLinux:8 | postgresql-server-devel | 13.13-1.module_el8.9.0+3692+8714f643 | ALSA-2023:7581 |
| AlmaLinux:9 | postgresql-server-devel | 15.5-1.module_el9.3.0+52+21733919 | ALSA-2023:7785 |
| AlmaLinux:9 | postgresql-server-devel | 13.13-1.el9_3 | ALSA-2023:7784 |
| AlmaLinux:8 | postgresql-static | 15.5-1.module_el8.9.0+3706+885c732e | ALSA-2023:7884 |
| AlmaLinux:8 | postgresql-static | 12.17-1.module_el8.9.0+3704+f1f917ce | ALSA-2023:7714 |
| AlmaLinux:8 | postgresql-static | 13.13-1.module_el8.9.0+3692+8714f643 | ALSA-2023:7581 |
| AlmaLinux:9 | postgresql-static | 15.5-1.module_el9.3.0+52+21733919 | ALSA-2023:7785 |
| AlmaLinux:9 | postgresql-static | 13.13-1.el9_3 | ALSA-2023:7784 |
| AlmaLinux:8 | postgresql-test | 15.5-1.module_el8.9.0+3706+885c732e | ALSA-2023:7884 |
| AlmaLinux:8 | postgresql-test | 13.13-1.module_el8.9.0+3692+8714f643 | ALSA-2023:7581 |
| AlmaLinux:8 | postgresql-test | 12.17-1.module_el8.9.0+3704+f1f917ce | ALSA-2023:7714 |
| AlmaLinux:9 | postgresql-test | 13.13-1.el9_3 | ALSA-2023:7784 |
| AlmaLinux:9 | postgresql-test | 15.5-1.module_el9.3.0+52+21733919 | ALSA-2023:7785 |
| AlmaLinux:8 | postgresql-test-rpm-macros | 15.5-1.module_el8.9.0+3706+885c732e | ALSA-2023:7884 |
| AlmaLinux:8 | postgresql-test-rpm-macros | 12.17-1.module_el8.9.0+3704+f1f917ce | ALSA-2023:7714 |
| AlmaLinux:8 | postgresql-test-rpm-macros | 13.13-1.module_el8.9.0+3692+8714f643 | ALSA-2023:7581 |
| AlmaLinux:9 | postgresql-test-rpm-macros | 15.5-1.module_el9.3.0+52+21733919 | ALSA-2023:7785 |
| AlmaLinux:8 | postgresql-upgrade | 15.5-1.module_el8.9.0+3706+885c732e | ALSA-2023:7884 |
| AlmaLinux:8 | postgresql-upgrade | 13.13-1.module_el8.9.0+3692+8714f643 | ALSA-2023:7581 |
| AlmaLinux:8 | postgresql-upgrade | 12.17-1.module_el8.9.0+3704+f1f917ce | ALSA-2023:7714 |
| AlmaLinux:9 | postgresql-upgrade | 13.13-1.el9_3 | ALSA-2023:7784 |
| AlmaLinux:9 | postgresql-upgrade | 15.5-1.module_el9.3.0+52+21733919 | ALSA-2023:7785 |
| AlmaLinux:8 | postgresql-upgrade-devel | 12.17-1.module_el8.9.0+3704+f1f917ce | ALSA-2023:7714 |
| AlmaLinux:8 | postgresql-upgrade-devel | 15.5-1.module_el8.9.0+3706+885c732e | ALSA-2023:7884 |
| AlmaLinux:8 | postgresql-upgrade-devel | 13.13-1.module_el8.9.0+3692+8714f643 | ALSA-2023:7581 |
| AlmaLinux:9 | postgresql-upgrade-devel | 15.5-1.module_el9.3.0+52+21733919 | ALSA-2023:7785 |
| AlmaLinux:9 | postgresql-upgrade-devel | 13.13-1.el9_3 | ALSA-2023:7784 |
| Alpine:v3.20 | postgresql14 | 14.9-r0 | ALPINE-CVE-2023-39417 |
| Alpine:v3.20 | postgresql15 | 15.4-r0 | ALPINE-CVE-2023-39417 |
| Alpine:v3.21 | postgresql15 | 15.4-r0 | ALPINE-CVE-2023-39417 |
| Alpine:v3.22 | postgresql15 | 15.4-r0 | ALPINE-CVE-2023-39417 |
| Debian:12 | pgextwlist | 1.15-2+deb12u1 | DEBIAN-CVE-2023-39417 |
| Debian:13 | pgextwlist | 1.19-1+deb13u1 | DEBIAN-CVE-2023-39417 |
| Debian:14 | pgextwlist | 1.20-1 | DEBIAN-CVE-2023-39417 |
| Debian:12 | postgresql-15 | 15.5-0+deb12u1 | DEBIAN-CVE-2023-39417 |
| Debian:12 | postgresql-15 | 15.5-0+deb12u1 | DSA-5553-1 |
| Rocky Linux:8 | pg_repack | 0:1.4.8-1.module+el8.10.0+1858+fcc46a79 | RLSA-2023:7884 |
| Rocky Linux:8 | pg_repack | 0:1.4.6-3.module+el8.5.0+684+c3892ef9 | RLSA-2023:7581 |
| Rocky Linux:8 | pg_repack | 0:1.4.6-3.module+el8.5.0+684+c3892ef9 | RLSA-2023:7714 |
| Rocky Linux:8 | pg_repack | 0:1.4.8-1.module+el8.9.0+1525+fc91df60 | RLSA-2023:7884 |
| Rocky Linux:8 | pg_repack | 0:1.4.8-1.module+el8.10.0+40056+df351139 | RLSA-2023:7884 |
| Rocky Linux:8 | pg_repack | 0:1.4.8-1.module+el8.10.0+1622+bd25b19c | RLSA-2023:7884 |
| Rocky Linux:8 | pgaudit | 0:1.5.0-1.module+el8.8.0+1443+0e26d3b2 | RLSA-2023:7581 |
| Rocky Linux:8 | pgaudit | 0:1.4.0-5.module+el8.9.0+1331+6f33d496 | RLSA-2023:7714 |
| Rocky Linux:8 | pgaudit | 0:1.7.0-1.module+el8.10.0+40056+df351139 | RLSA-2023:7884 |
| Rocky Linux:8 | pgaudit | 0:1.7.0-1.module+el8.9.0+1525+fc91df60 | RLSA-2023:7884 |
| Rocky Linux:9 | pgaudit | 0:1.7.0-1.module+el9.5.0+30637+4391fcca | RLSA-2023:7785 |
| Rocky Linux:8 | postgres-decoderbufs | 0:1.9.7-1.Final.module+el8.9.0+1525+fc91df60 | RLSA-2023:7884 |
| Rocky Linux:8 | postgres-decoderbufs | 0:1.9.7-1.Final.module+el8.10.0+40056+df351139 | RLSA-2023:7884 |
| Rocky Linux:8 | postgres-decoderbufs | 0:0.10.0-2.module+el8.5.0+684+c3892ef9 | RLSA-2023:7581 |
| Rocky Linux:8 | postgres-decoderbufs | 0:0.10.0-2.module+el8.5.0+684+c3892ef9 | RLSA-2023:7714 |
| Rocky Linux:9 | postgres-decoderbufs | 0:1.9.7-1.Final.module+el9.5.0+30637+4391fcca | RLSA-2023:7785 |
| Rocky Linux:8 | postgresql | 0:12.17-1.module+el8.9.0+1603+444d1b54 | RLSA-2023:7714 |
| Rocky Linux:8 | postgresql | 0:13.13-1.module+el8.9.0+1593+6cfc6c10 | RLSA-2023:7581 |
| Ubuntu:22.04:LTS | postgresql-14 | 14.9-0ubuntu0.22.04.1 | UBUNTU-CVE-2023-39417 |
| Ubuntu:22.04:LTS | postgresql-14 | 14.9-0ubuntu0.22.04.1 | USN-6296-1 |
Affected products (as reported)
Weakness: CWE-89 · Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
References
- RHSA-2023:7545 vendor-advisory, x_refsource_REDHAT
- RHSA-2023:7579 vendor-advisory, x_refsource_REDHAT
- RHSA-2023:7580 vendor-advisory, x_refsource_REDHAT
- RHSA-2023:7581 vendor-advisory, x_refsource_REDHAT
- RHSA-2023:7616 vendor-advisory, x_refsource_REDHAT
- RHSA-2023:7656 vendor-advisory, x_refsource_REDHAT
- RHSA-2023:7666 vendor-advisory, x_refsource_REDHAT
- RHSA-2023:7667 vendor-advisory, x_refsource_REDHAT
- RHSA-2023:7694 vendor-advisory, x_refsource_REDHAT
- RHSA-2023:7695 vendor-advisory, x_refsource_REDHAT
- RHSA-2023:7714 vendor-advisory, x_refsource_REDHAT
- RHSA-2023:7770 vendor-advisory, x_refsource_REDHAT
- RHSA-2023:7772 vendor-advisory, x_refsource_REDHAT
- RHSA-2023:7784 vendor-advisory, x_refsource_REDHAT
- RHSA-2023:7785 vendor-advisory, x_refsource_REDHAT
- RHSA-2023:7883 vendor-advisory, x_refsource_REDHAT
- RHSA-2023:7884 vendor-advisory, x_refsource_REDHAT
- RHSA-2023:7885 vendor-advisory, x_refsource_REDHAT
- RHSA-2024:0304 vendor-advisory, x_refsource_REDHAT
- RHSA-2024:0332 vendor-advisory, x_refsource_REDHAT
- RHSA-2024:0337 vendor-advisory, x_refsource_REDHAT
- https://access.redhat.com/security/cve/CVE-2023-39417 vdb-entry, x_refsource_REDHAT
- RHBZ#2228111 issue-tracking, x_refsource_REDHAT
- https://www.postgresql.org/support/security/CVE-2023-39417
- https://lists.debian.org/debian-lts-announce/2023/10/msg00003.html x_transferred
- https://security.netapp.com/advisory/ntap-20230915-0002/ x_transferred
- https://www.debian.org/security/2023/dsa-5553 x_transferred
- https://www.debian.org/security/2023/dsa-5554 x_transferred
- https://lists.debian.org/debian-lts-announce/2026/09/msg00039.html