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 package | Versions | Reported by |
|---|---|---|
| advanced-cluster-security/rhacs-central-db-rhel8 | Not 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-rhel8 | Not 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-bundle | Not 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-rhel8 | Not 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-rhel8 | Not specified Not affected: from 4.2.4-7 before *, from 3.74.8-9 before *, from 4.1.6-6 before * | CVE List |
| postgresql:13 | Not specified Not affected: from 8090020231114113712.a75119d5 before *, from 8040020231127154806.522a0ee4 before *, from 8060020231114115246.ad008a3a before *, from 8080020231114105206.63b34585 before * | CVE List |
| postgresql:12 | Not 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:15 | Not specified Not affected: from 8090020231114113548.a75119d5 before *, from 8080020231113134015.63b34585 before *, from 9030020231120082734.rhel9 before *, from 9020020231115020618.rhel9 before * | CVE List |
| postgresql | Not 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-postgresql | Not specified Not affected: from 0:12.17-1.el7 before * | CVE List |
| rh-postgresql13-postgresql | Not specified Not affected: from 0:13.13-1.el7 before * | CVE List |
| postgresql:10/postgresql | Not specified | CVE List |
| rh-postgresql10-postgresql | Not specified | CVE List |
| 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 | NVD |
| redhat software_collections | Not specified | NVD |
| redhat enterprise_linux | 8.0, 9.0 | NVD |
| debian debian_linux | 8.0, 11.0, 12.0 | NVD |
| 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 | Bitnami Vulnerability Database |
All scores
| redhat | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVD | 8.8high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| Bitnami Vulnerability Database | high rating |
Classification
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
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2023-39417 changed 2026-11-26 | CVE Terms of Use |
| NVD | CVE-2023-39417 changed 2026-11-25 | Public domain |
| Bitnami Vulnerability Database | BIT-POSTGRESQL-2023-39417 changed 2026-10-01 | Apache-2.0 |