CVE-2023-39417
JSON

7.5high

Postgresql: extension script @substitutions@ within quoting allow sql injection

Severity
7.5high CVSS:3.1 by redhat
Exploit likelihood
1.63% (higher than 76% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
redhat
Also known as
BIT-POSTGRESQL-2023-39417

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

Product or packageVersionsReported by
advanced-cluster-security/rhacs-central-db-rhel8Not specified
Not affected: from 4.2.4-6 before *, from 3.74.8-9 before *, from 4.1.6-6 before *
CVE List
advanced-cluster-security/rhacs-main-rhel8Not specified
Not affected: from 4.2.4-6 before *, from 3.74.8-9 before *, from 4.1.6-6 before *
CVE List
advanced-cluster-security/rhacs-operator-bundleNot specified
Not affected: from 4.2.4-7 before *, from 3.74.8-7 before *, from 4.1.6-6 before *
CVE List
advanced-cluster-security/rhacs-scanner-db-rhel8Not specified
Not affected: from 4.2.4-6 before *, from 3.74.8-9 before *, from 4.1.6-6 before *
CVE List
advanced-cluster-security/rhacs-scanner-db-slim-rhel8Not specified
Not affected: from 4.2.4-7 before *, from 3.74.8-9 before *, from 4.1.6-6 before *
CVE List
postgresql:13Not specified
Not affected: from 8090020231114113712.a75119d5 before *, from 8040020231127154806.522a0ee4 before *, from 8060020231114115246.ad008a3a before *, from 8080020231114105206.63b34585 before *
CVE List
postgresql:12Not specified
Not affected: from 8090020231128173330.a75119d5 before *, from 8020020231128165246.4cda2c84 before *, from 8040020231127153301.522a0ee4 before *, from 8060020231128165328.ad008a3a before *, from 8080020231128165335.63b34585 before *
CVE List
postgresql:15Not specified
Not affected: from 8090020231114113548.a75119d5 before *, from 8080020231113134015.63b34585 before *, from 9030020231120082734.rhel9 before *, from 9020020231115020618.rhel9 before *
CVE List
postgresqlNot specified
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 *
CVE List
rh-postgresql12-postgresqlNot specified
Not affected: from 0:12.17-1.el7 before *
CVE List
rh-postgresql13-postgresqlNot specified
Not affected: from 0:13.13-1.el7 before *
CVE List
postgresql:10/postgresqlNot specifiedCVE List

All scores

redhat7.5high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
NVD8.8high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Bitnami Vulnerability Databasehigh rating

Classification

CWE-89

SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.

What each source says

CVE List

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.

NVD (es)

EN EL SCRIPT DE EXTENSIÓN, se encontró una vulnerabilidad de inyección SQL en PostgreSQL si usa @extowner@, @extschema@ o @extschema:...@ dentro de una construcción de cotización (cotización en dólares, '' o ""). Si un administrador ha instalado archivos de una extensión vulnerable, de confianza y no empaquetada, un atacante con privilegios CREATE de nivel de base de datos puede ejecutar código arbitrario como superusuario de arranque.

References

https://access.redhat.com/errata/RHSA-2023:7545advisory, third-party-advisory, vendor-advisory
https://access.redhat.com/errata/RHSA-2023:7579advisory, third-party-advisory, vendor-advisory
https://access.redhat.com/errata/RHSA-2023:7580advisory, third-party-advisory, vendor-advisory
https://access.redhat.com/errata/RHSA-2023:7581advisory, third-party-advisory, vendor-advisory
https://access.redhat.com/errata/RHSA-2023:7616advisory, third-party-advisory, vendor-advisory
https://access.redhat.com/errata/RHSA-2023:7656advisory, third-party-advisory, vendor-advisory
https://access.redhat.com/errata/RHSA-2023:7666advisory, third-party-advisory, vendor-advisory
https://access.redhat.com/errata/RHSA-2023:7667advisory, third-party-advisory, vendor-advisory
https://access.redhat.com/errata/RHSA-2023:7694advisory, third-party-advisory, vendor-advisory
https://access.redhat.com/errata/RHSA-2023:7695advisory, third-party-advisory, vendor-advisory
https://access.redhat.com/errata/RHSA-2023:7714advisory, third-party-advisory, vendor-advisory
https://access.redhat.com/errata/RHSA-2023:7770advisory, third-party-advisory, vendor-advisory

Sources

SourceRecordLicence
CVE ListCVE-2023-39417 changed 2026-11-26CVE Terms of Use
NVDCVE-2023-39417 changed 2026-11-25Public domain
Bitnami Vulnerability DatabaseBIT-POSTGRESQL-2023-39417 changed 2026-10-01Apache-2.0