cve.bz

CVE-2023-39417 SQL Injection

8.8 highEPSS 1.7%Fix available

High (8.8). EPSS 1.7% estimated probability of exploitation activity in the next 30 days.

On this page
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.

Severity

CVSS 3.1

8.8 high
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS
1.7% (unchanged from 1.7% a week ago; 1.7% 30 days ago) estimated probability of exploitation activity in the next 30 days; 77th percentile. Scored 2026-11-15. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: total, assessed 2025-07-09. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-89 Improper Neutralization of Special Elements used in an SQL Command (SQL Injection)
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

  • Red Hat Red Hat Advanced Cluster Security 4.2: fixed in 4.2.4-6
  • Red Hat Red Hat Advanced Cluster Security 4.2: fixed in 4.2.4-7
  • Red Hat Red Hat Enterprise Linux 8: fixed in 8090020231114113712.a75119d5
  • Red Hat Red Hat Enterprise Linux 8: fixed in 8090020231128173330.a75119d5
  • Red Hat Red Hat Enterprise Linux 8: fixed in 8090020231114113548.a75119d5
  • Red Hat Red Hat Enterprise Linux 8.2 Advanced Update Support: fixed in 8020020231128165246.4cda2c84
  • Red Hat Red Hat Enterprise Linux 8.2 Telecommunications Update Service: fixed in 8020020231128165246.4cda2c84
  • Red Hat Red Hat Enterprise Linux 8.2 Update Services for SAP Solutions: fixed in 8020020231128165246.4cda2c84
  • Debian, Ubuntu, Red Hat, SUSE, openSUSE, AlmaLinux, Rocky Linux, Alpine, Azure Linux: fixed package versions per release
  • Vendor advisory: https://www.postgresql.org/support/security/CVE-2023-39417

Ask an AI about this CVE

Show the promptExplain CVE-2023-39417 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2023-39417?via=ask-ai-copy and https://cve.bz/cve/CVE-2023-39417?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2023-39417 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Badge for a README or a site

CVE-2023-39417

An image that stays current: it is drawn from the data each time it is fetched (a host that proxies images, as GitHub does, may show its copy for a while). Markdown:

[![CVE-2023-39417](https://cve.bz/cve/badge/CVE-2023-39417.svg)](https://cve.bz/cve/CVE-2023-39417)

HTML:

<a href="https://cve.bz/cve/CVE-2023-39417"><img src="https://cve.bz/cve/badge/CVE-2023-39417.svg" alt="CVE-2023-39417"></a>

Affected

Versions

From the CNA's record in the CVE List.

Fixed in

ProductFixed in
Red Hat Advanced Cluster Security 4.24.2.4-6
Red Hat Advanced Cluster Security 4.24.2.4-7
Red Hat Enterprise Linux 88090020231114113712.a75119d5
Red Hat Enterprise Linux 88090020231128173330.a75119d5
Red Hat Enterprise Linux 88090020231114113548.a75119d5
Red Hat Enterprise Linux 8.2 Advanced Update Support8020020231128165246.4cda2c84
Red Hat Enterprise Linux 8.2 Telecommunications Update Service8020020231128165246.4cda2c84
Red Hat Enterprise Linux 8.2 Update Services for SAP Solutions8020020231128165246.4cda2c84
Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support8040020231127153301.522a0ee4
Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support8040020231127154806.522a0ee4
Red Hat Enterprise Linux 8.4 Telecommunications Update Service8040020231127153301.522a0ee4
Red Hat Enterprise Linux 8.4 Telecommunications Update Service8040020231127154806.522a0ee4
Red Hat Enterprise Linux 8.4 Update Services for SAP Solutions8040020231127153301.522a0ee4
Red Hat Enterprise Linux 8.4 Update Services for SAP Solutions8040020231127154806.522a0ee4
Red Hat Enterprise Linux 8.6 Extended Update Support8060020231114115246.ad008a3a
Red Hat Enterprise Linux 8.6 Extended Update Support8060020231128165328.ad008a3a
Red Hat Enterprise Linux 8.8 Extended Update Support8080020231114105206.63b34585
Red Hat Enterprise Linux 8.8 Extended Update Support8080020231128165335.63b34585
Red Hat Enterprise Linux 8.8 Extended Update Support8080020231113134015.63b34585
Red Hat Enterprise Linux 90:13.13-1.el9_3
Red Hat Enterprise Linux 99030020231120082734.rhel9
Red Hat Enterprise Linux 9.0 Extended Update Support0:13.13-1.el9_0
Red Hat Enterprise Linux 9.2 Extended Update Support0:13.13-1.el9_2
Red Hat Enterprise Linux 9.2 Extended Update Support9020020231115020618.rhel9
Red Hat Software Collections for Red Hat Enterprise Linux 70:12.17-1.el7
Red Hat Software Collections for Red Hat Enterprise Linux 70:13.13-1.el7
Red Hat RHACS-3.74-RHEL-83.74.8-9
Red Hat RHACS-3.74-RHEL-83.74.8-7
Red Hat RHACS-4.1-RHEL-84.1.6-6

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian10postgresql-1111.21-0+deb10u2DLA-3600-1
Debian11postgresql-1313.13-0+deb11u1DSA-5554-1
Debian12pgextwlist1.15-2+deb12u1DEBIAN-CVE-2023-39417
Debian12postgresql-1515.5-0+deb12u1DEBIAN-CVE-2023-39417 DSA-5553-1
Debian13pgextwlist1.19-1+deb13u1DEBIAN-CVE-2023-39417
Debian14pgextwlist1.20-1DEBIAN-CVE-2023-39417
Ubuntu20.04:LTSpostgresql-1212.16-0ubuntu0.20.04.1UBUNTU-CVE-2023-39417 USN-6296-1
Ubuntu22.04:LTSpostgresql-1414.9-0ubuntu0.22.04.1UBUNTU-CVE-2023-39417 USN-6296-1
UbuntuPro:14.04:LTSpostgresql-9.3no fix listedUBUNTU-CVE-2023-39417
UbuntuPro:16.04:LTSpostgresql-9.59.5.25-0ubuntu0.16.04.1+esm5UBUNTU-CVE-2023-39417 USN-6366-1
UbuntuPro:18.04:LTSpostgresql-10no fix listedUBUNTU-CVE-2023-39417
Red Hatenterprise_linux:8::appstreampg_repack, pg_repack-debuginfo, pg_repack-debugsource0:1.4.6-3.module+el8.9.0+19330+c97ddbdfRHSA-2023:7714
Red Hatenterprise_linux:8::appstreampg_repack, pg_repack-debuginfo, pg_repack-debugsource0:1.4.6-3.module+el8.9.0+20664+9c30cf7fRHSA-2023:7581
Red Hatenterprise_linux:8::appstreampg_repack, pg_repack-debuginfo, pg_repack-debugsource0:1.4.8-1.module+el8.9.0+19797+c4ce5969RHSA-2023:7884
Red Hatenterprise_linux:8::appstreampgaudit, pgaudit-debuginfo, pgaudit-debugsource0:1.4.0-5.module+el8.9.0+19330+c97ddbdfRHSA-2023:7714
Red Hatenterprise_linux:8::appstreampgaudit, pgaudit-debuginfo, pgaudit-debugsource0:1.5.0-1.module+el8.9.0+20664+9c30cf7fRHSA-2023:7581
Red Hatenterprise_linux:8::appstreampgaudit, pgaudit-debuginfo, pgaudit-debugsource0:1.7.0-1.module+el8.9.0+19797+c4ce5969RHSA-2023:7884
Red Hatenterprise_linux:8::appstreampostgres-decoderbufs, postgres-decoderbufs-debuginfo, postgres-decoderbufs-debugsource0:0.10.0-2.module+el8.9.0+19330+c97ddbdfRHSA-2023:7714
Red Hatenterprise_linux:8::appstreampostgres-decoderbufs, postgres-decoderbufs-debuginfo, postgres-decoderbufs-debugsource0:0.10.0-2.module+el8.9.0+20664+9c30cf7fRHSA-2023:7581
Red Hatenterprise_linux:8::appstreampostgres-decoderbufs, postgres-decoderbufs-debuginfo, postgres-decoderbufs-debugsource0:1.9.7-1.Final.module+el8.9.0+19797+c4ce5969RHSA-2023:7884
Red Hatenterprise_linux:8::appstreampostgresql, postgresql-docs, postgresql-test and 25 more0:15.5-1.module+el8.9.0+20663+03952ce4RHSA-2023:7884
Red Hatenterprise_linux:8::appstreampostgresql, postgresql-docs, postgresql-test and 22 more0:12.17-1.module+el8.9.0+20789+410e66ceRHSA-2023:7714
Red Hatenterprise_linux:8::appstreampostgresql, postgresql-docs, postgresql-test and 22 more0:13.13-1.module+el8.9.0+20664+9c30cf7fRHSA-2023:7581
45 more for Red Hat in the JSON and on Red Hat's page.
SUSELinux Enterprise High Performance Computing 15 SP1-LTSS, Linux Enterprise Server 15 SP1-LTSS, Linux Enterprise Server for SAP Applications 15 SP1postgresql1212.16-150100.3.44.1SUSE-SU-2023:3346-1
SUSELinux Enterprise Module for Basesystem 15 SP4, Linux Enterprise Module for Basesystem 15 SP5, Linux Enterprise Module for Package Hub 15 SP4 and 4 morepostgresql1515.4-150200.5.12.1SUSE-SU-2023:3347-1
SUSELinux Enterprise Module for Basesystem 15 SP4, Linux Enterprise Module for Legacy 15 SP5, Linux Enterprise Module for Package Hub 15 SP4 and 4 morepostgresql1414.9-150200.5.29.1SUSE-SU-2023:3348-1
SUSELinux Enterprise Module for Legacy 15 SP4, Manager Proxy 4.2, Manager Server 4.2postgresql1313.12-150200.5.43.1SUSE-SU-2023:3344-1
SUSELinux Enterprise Server 12 SP5, Linux Enterprise Server for SAP Applications 12 SP5, Linux Enterprise Software Development Kit 12 SP5postgresql1212.16-3.42.1SUSE-SU-2023:3341-1
SUSELinux Enterprise Server 12 SP5, Linux Enterprise Server for SAP Applications 12 SP5, Linux Enterprise Software Development Kit 12 SP5postgresql1313.12-3.36.1SUSE-SU-2023:3345-1
SUSELinux Enterprise Server 12 SP5, Linux Enterprise Server for SAP Applications 12 SP5, Linux Enterprise Software Development Kit 12 SP5postgresql1414.9-3.26.1SUSE-SU-2023:3343-1
SUSELinux Enterprise Server 12 SP5, Linux Enterprise Server for SAP Applications 12 SP5, Linux Enterprise Software Development Kit 12 SP5postgresql1515.4-3.12.1SUSE-SU-2023:3342-1
openSUSELeap 15.4, Leap 15.5postgresql1212.16-150200.8.47.1SUSE-SU-2023:3384-1
openSUSELeap 15.4, Leap 15.5postgresql1313.12-150200.5.43.1SUSE-SU-2023:3344-1
openSUSELeap 15.4, Leap 15.5postgresql1414.9-150200.5.29.1SUSE-SU-2023:3348-1
openSUSELeap 15.4, Leap 15.5postgresql1515.4-150200.5.12.1SUSE-SU-2023:3347-1
openSUSETumbleweedpostgresql1111.21-1.1openSUSE-SU-2024:13118-1
openSUSETumbleweedpostgresql1212.16-1.1openSUSE-SU-2024:13119-1
openSUSETumbleweedpostgresql1313.12-1.1openSUSE-SU-2024:13120-1
openSUSETumbleweedpostgresql1414.9-1.1openSUSE-SU-2024:13358-1
openSUSETumbleweedpostgresql1515.4-1.1openSUSE-SU-2024:13134-1
AlmaLinux8pg_repack1.4.6-3.module_el8.6.0+2758+4f4474dfALSA-2023:7714
AlmaLinux8pg_repack1.4.6-3.module_el8.6.0+2760+1746ec94ALSA-2023:7581
AlmaLinux8pg_repack1.4.6-3.module_el8.6.0+3094+eb237fb8ALSA-2023:7714
AlmaLinux8pg_repack1.4.6-3.module_el8.6.0+3095+ee60d910ALSA-2023:7581
AlmaLinux8pg_repack1.4.8-1.module_el8.8.0+3487+43ec1b9fALSA-2023:7884
AlmaLinux8pgaudit1.4.0-5.module_el8.6.0+2758+4f4474dfALSA-2023:7714
AlmaLinux8pgaudit1.4.0-5.module_el8.6.0+3094+eb237fb8ALSA-2023:7714
AlmaLinux8pgaudit1.5.0-1.module_el8.6.0+2760+1746ec94ALSA-2023:7581
AlmaLinux8pgaudit1.5.0-1.module_el8.6.0+3095+ee60d910ALSA-2023:7581
AlmaLinux8pgaudit1.7.0-1.module_el8.8.0+3487+43ec1b9fALSA-2023:7884
AlmaLinux8postgres-decoderbufs0.10.0-2.module_el8.6.0+2758+4f4474dfALSA-2023:7714
AlmaLinux8postgres-decoderbufs0.10.0-2.module_el8.6.0+2760+1746ec94ALSA-2023:7581
11 more for AlmaLinux in the JSON.
Rocky Linux8pg_repack0:1.4.6-3.module+el8.5.0+684+c3892ef9RLSA-2023:7581 RLSA-2023:7714
Rocky Linux8pg_repack0:1.4.8-1.module+el8.10.0+1622+bd25b19cRLSA-2023:7884
Rocky Linux8pg_repack0:1.4.8-1.module+el8.10.0+1858+fcc46a79RLSA-2023:7884
Rocky Linux8pg_repack0:1.4.8-1.module+el8.10.0+40056+df351139RLSA-2023:7884
Rocky Linux8pg_repack0:1.4.8-1.module+el8.9.0+1525+fc91df60RLSA-2023:7884
Rocky Linux8pgaudit0:1.4.0-5.module+el8.9.0+1331+6f33d496RLSA-2023:7714
Rocky Linux8pgaudit0:1.5.0-1.module+el8.8.0+1443+0e26d3b2RLSA-2023:7581
Rocky Linux8pgaudit0:1.7.0-1.module+el8.10.0+40056+df351139RLSA-2023:7884
Rocky Linux8pgaudit0:1.7.0-1.module+el8.9.0+1525+fc91df60RLSA-2023:7884
Rocky Linux8postgres-decoderbufs0:0.10.0-2.module+el8.5.0+684+c3892ef9RLSA-2023:7581 RLSA-2023:7714
Rocky Linux8postgres-decoderbufs0:1.9.7-1.Final.module+el8.10.0+40056+df351139RLSA-2023:7884
Rocky Linux8postgres-decoderbufs0:1.9.7-1.Final.module+el8.9.0+1525+fc91df60RLSA-2023:7884
4 more for Rocky Linux in the JSON.
Alpinev3.13, v3.14postgresql13.12-r0ALPINE-CVE-2023-39417
Alpinev3.15, v3.16, v3.17 and 1 morepostgresql1212.16-r0ALPINE-CVE-2023-39417
Alpinev3.15, v3.16, v3.17 and 2 morepostgresql1313.12-r0ALPINE-CVE-2023-39417
Alpinev3.15, v3.16, v3.17 and 3 morepostgresql1414.9-r0ALPINE-CVE-2023-39417
Alpinev3.17, v3.18, v3.19 and 3 morepostgresql1515.4-r0ALPINE-CVE-2023-39417
Azure Linux2postgresql14.10-1AZL-27892

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause; the Alpine secdb, CC BY-SA 4.0; Microsoft's Azure Linux vulnerability data, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpine.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

Bundled extensions are not vulnerable. Also, PostgreSQL will block this attack in the core server, so there's no need to modify individual extensions.

ProductPackageStateAdvisory
Red Hat Advanced Cluster Security 4.2advanced-cluster-security/rhacs-central-db-rhel8:4.2.4-6Fixed 2024-01-22RHSA-2024:0337
Red Hat Advanced Cluster Security 4.2advanced-cluster-security/rhacs-main-rhel8:4.2.4-6Fixed 2024-01-22RHSA-2024:0337
Red Hat Advanced Cluster Security 4.2advanced-cluster-security/rhacs-operator-bundle:4.2.4-7Fixed 2024-01-22RHSA-2024:0337
Red Hat Advanced Cluster Security 4.2advanced-cluster-security/rhacs-scanner-db-rhel8:4.2.4-6Fixed 2024-01-22RHSA-2024:0337
Red Hat Advanced Cluster Security 4.2advanced-cluster-security/rhacs-scanner-db-slim-rhel8:4.2.4-7Fixed 2024-01-22RHSA-2024:0337
Red Hat Enterprise Linux 8postgresql:13-8090020231114113712.a75119d5Fixed 2023-11-29RHSA-2023:7581
Red Hat Enterprise Linux 8postgresql:12-8090020231128173330.a75119d5Fixed 2023-12-11RHSA-2023:7714
Red Hat Enterprise Linux 8postgresql:15-8090020231114113548.a75119d5Fixed 2023-12-20RHSA-2023:7884
Red Hat Enterprise Linux 8.2 Advanced Update Supportpostgresql:12-8020020231128165246.4cda2c84Fixed 2023-12-06RHSA-2023:7667
Red Hat Enterprise Linux 8.2 Telecommunications Update Servicepostgresql:12-8020020231128165246.4cda2c84Fixed 2023-12-06RHSA-2023:7667
Red Hat Enterprise Linux 8.2 Update Services for SAP Solutionspostgresql:12-8020020231128165246.4cda2c84Fixed 2023-12-06RHSA-2023:7667
Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Supportpostgresql:12-8040020231127153301.522a0ee4Fixed 2023-12-07RHSA-2023:7694
Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Supportpostgresql:13-8040020231127154806.522a0ee4Fixed 2023-12-07RHSA-2023:7695
Red Hat Enterprise Linux 8.4 Telecommunications Update Servicepostgresql:12-8040020231127153301.522a0ee4Fixed 2023-12-07RHSA-2023:7694
Red Hat Enterprise Linux 8.4 Telecommunications Update Servicepostgresql:13-8040020231127154806.522a0ee4Fixed 2023-12-07RHSA-2023:7695
Red Hat Enterprise Linux 8.4 Update Services for SAP Solutionspostgresql:12-8040020231127153301.522a0ee4Fixed 2023-12-07RHSA-2023:7694
Red Hat Enterprise Linux 6postgresqlOut of support scope
Red Hat Enterprise Linux 7postgresqlOut of support scope
Red Hat Enterprise Linux 8postgresql:10/postgresqlNot affected
Red Hat Software Collectionsrh-postgresql10-postgresqlWill not fix
23 more in the JSON and on Red Hat's page.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2023-39417.

ICS advisories (CISA)

AdvisoryTitlePublishedSectorsAffectedFixed
ICSA-26-120-06ABB Ability Symphony Plus Engineering2026-04-13Chemical, Critical Manufacturing, Energy, Water and Wastewater, Water and WastewaterABB Ability Symphony Plus S+ Engineering 2.2, ABB Ability Symphony Plus S+ Engineering 2.3, ABB Ability Symphony Plus S+ Engineering 2.3 RU1 and 5 moreABB Ability Symphony Plus S+ Engineering 2.4 SP2 RU1
ICSA-24-046-15Siemens SINEC NMS2024-02-13MultipleSINEC NMSnone listed

From CISA's ICS advisories (CSAF), provided under CISA's notification. Only the facts are shown; each advisory is on CISA's page. Credits.

Attack patterns (CAPEC)

  • CAPEC-7 Blind SQL Injection Likelihood: High · Severity: High
  • CAPEC-66 SQL Injection Likelihood: High · Severity: High
  • CAPEC-108 Command Line Execution through SQL Injection Likelihood: Low · Severity: Very High
  • CAPEC-109 Object Relational Mapping Injection Likelihood: Low · Severity: High
  • CAPEC-110 SQL Injection through SOAP Parameter Tampering Likelihood: High · Severity: Very High
  • CAPEC-470 Expanding Control over the Operating System from the Database Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON