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

- Severity: High 7.5 (CVSS:3.1, scored by redhat) `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.63%, higher than 76% of CVEs (2026-12-01)
- Published: 2023-08-11T12:19:15.108Z
- Modified: 2026-11-26T21:12:32.041Z
- Also known as: BIT-POSTGRESQL-2023-39417
- Weaknesses: CWE-89
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: redhat

## 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.

(As written by CVE List.)

## Affected

- advanced-cluster-security/rhacs-central-db-rhel8: no versions given (not affected: from 4.2.4-6 before *; from 3.74.8-9 before *; from 4.1.6-6 before *)
- advanced-cluster-security/rhacs-main-rhel8: no versions given (not affected: from 4.2.4-6 before *; from 3.74.8-9 before *; from 4.1.6-6 before *)
- advanced-cluster-security/rhacs-operator-bundle: no versions given (not affected: from 4.2.4-7 before *; from 3.74.8-7 before *; from 4.1.6-6 before *)
- advanced-cluster-security/rhacs-scanner-db-rhel8: no versions given (not affected: from 4.2.4-6 before *; from 3.74.8-9 before *; from 4.1.6-6 before *)
- advanced-cluster-security/rhacs-scanner-db-slim-rhel8: no versions given (not affected: from 4.2.4-7 before *; from 3.74.8-9 before *; from 4.1.6-6 before *)
- postgresql:13: no versions given (not affected: from 8090020231114113712.a75119d5 before *; from 8040020231127154806.522a0ee4 before *; from 8060020231114115246.ad008a3a before *; from 8080020231114105206.63b34585 before *)
- postgresql:12: no versions given (not affected: from 8090020231128173330.a75119d5 before *; from 8020020231128165246.4cda2c84 before *; from 8040020231127153301.522a0ee4 before *; from 8060020231128165328.ad008a3a before *; from 8080020231128165335.63b34585 before *)
- postgresql:15: no versions given (not affected: from 8090020231114113548.a75119d5 before *; from 8080020231113134015.63b34585 before *; from 9030020231120082734.rhel9 before *; from 9020020231115020618.rhel9 before *)
- postgresql: no versions given (not affected: from 0:13.13-1.el9_3 before *; from 0:13.13-1.el9_0 before *; from 0:13.13-1.el9_2 before *)
- rh-postgresql12-postgresql: no versions given (not affected: from 0:12.17-1.el7 before *)
- rh-postgresql13-postgresql: no versions given (not affected: from 0:13.13-1.el7 before *)
- postgresql:10/postgresql: no versions given
- rh-postgresql10-postgresql: no versions given
- postgresql postgresql: from 11.0 before 11.21; from 12.0 before 12.16; from 13.0 before 13.12; from 14.0 before 14.9; from 15.0 before 15.4
- redhat software_collections: no versions given
- redhat enterprise_linux: 8.0; 9.0
- debian debian_linux: 8.0; 11.0; 12.0
- postgresql (Bitnami): from 11.0.0 before 11.21.0; from 12.0.0 before 12.16.0; from 13.0.0 before 13.12.0; from 14.0.0 before 14.9.0; from 15.0.0 before 15.4.0

## Every score

- redhat: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: 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`
- Bitnami Vulnerability Database: rating High

## References

- <https://access.redhat.com/errata/RHSA-2023:7545> (advisory, third-party-advisory, vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2023:7579> (advisory, third-party-advisory, vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2023:7580> (advisory, third-party-advisory, vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2023:7581> (advisory, third-party-advisory, vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2023:7616> (advisory, third-party-advisory, vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2023:7656> (advisory, third-party-advisory, vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2023:7666> (advisory, third-party-advisory, vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2023:7667> (advisory, third-party-advisory, vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2023:7694> (advisory, third-party-advisory, vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2023:7695> (advisory, third-party-advisory, vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2023:7714> (advisory, third-party-advisory, vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2023:7770> (advisory, third-party-advisory, vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2023:7772> (advisory, third-party-advisory, vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2023:7784> (advisory, third-party-advisory, vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2023:7785> (advisory, third-party-advisory, vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2023:7883> (advisory, third-party-advisory, vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2023:7884> (advisory, third-party-advisory, vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2023:7885> (advisory, third-party-advisory, vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2024:0304> (advisory, third-party-advisory, vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2024:0332> (advisory, third-party-advisory, vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2024:0337> (advisory, third-party-advisory, vendor-advisory)
- <https://access.redhat.com/security/cve/CVE-2023-39417> (advisory, third-party-advisory, vdb-entry)
- <https://bugzilla.redhat.com/show_bug.cgi?id=2228111> (advisory, issue-tracking, third-party-advisory)
- <https://www.postgresql.org/support/security/CVE-2023-39417> (advisory, vendor-advisory)
- <https://lists.debian.org/debian-lts-announce/2023/10/msg00003.html> (web)
- <https://security.netapp.com/advisory/ntap-20230915-0002/> (web)
- <https://www.debian.org/security/2023/dsa-5553> (web)
- <https://www.debian.org/security/2023/dsa-5554> (web)
- <https://lists.debian.org/debian-lts-announce/2026/09/msg00039.html> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2023-39417> (web)

## Sources

- CVE List: [CVE-2023-39417](https://www.cve.org/CVERecord?id=CVE-2023-39417), CVE Terms of Use, modified 2026-11-26
- NVD: [CVE-2023-39417](https://nvd.nist.gov/vuln/detail/CVE-2023-39417), Public domain, modified 2026-11-25
- Bitnami Vulnerability Database: [BIT-POSTGRESQL-2023-39417](https://osv.dev/vulnerability/BIT-POSTGRESQL-2023-39417), Apache-2.0, modified 2026-10-01

---

Page: https://cve.day/CVE-2023-39417 · Whole record: https://cve.day/CVE-2023-39417.json · Rebuilt by cve.day 2026-11-26T21:17:13.316Z
