SQL injection in postgresql
Key facts
- Attack vector
- Network
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- Low
- Impact type
- SQL injection
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Partial Red Hat: 15 fixed, 3 without a fix
Attack profile from CVSS 3.1 · NVD. Fix status from CNA and Red Hat. Impact type from CWE-89.
Summary
A flaw was found in PostgreSQL versions before 13.1, before 12.5, before 11.10, before 10.15, before 9.6.20 and before 9.5.24. An attacker having permission to create non-temporary objects in at least one schema can execute arbitrary SQL functions under the identity of a superuser. The highest threat from this vulnerability is to data confidentiality and integrity as well as system availability.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | postgresql | All PostgreSQL versions before 13.1, before 12.5, before 11.10, before 10.15, before 9.6.20 and before 9.5.24 | — | No fix listed | CNA |
- postgresql Vendor— Affected All PostgreSQL versions before 13.1, before 12.5, before 11.10, before 10.15, before 9.6.20 and before 9.5.24 Fixed in — No fix listed CNA
CPE configurations NVD · 2
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:postgresql:postgresql:*:*:*:*:*:*:*:* | before 9.5.24; 9.6.0 to before 9.6.20; 10.0 to before 10.15; 11.0 to before 11.10; 12.0 to before 12.5; 13.0 to before 13.1 | Vulnerable | PostgreSQL |
| cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:* | 9.0 | Vulnerable | Debian |
- cpe:2.3:a:postgresql:postgresql:*:*:*:*:*:*:*:* Versions before 9.5.24; 9.6.0 to before 9.6.20; 10.0 to before 10.15; 11.0 to before 11.10; 12.0 to before 12.5; 13.0 to before 13.1 Vulnerable ·PostgreSQL
- cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:* Versions 9.0 Vulnerable ·Debian
Remediation
Red Hat 13 advisories
- RHSA-2021:1512 Released 2021-05-06 · Red Hat rating Importantpostgresql security update
- Red Hat Enterprise Linux Client (v. 7) postgresql-9.2.24-6.el7_9, postgresql-libs-9.2.24-6.el7_9
- Red Hat Enterprise Linux Client Optional (v. 7) postgresql-9.2.24-6.el7_9, postgresql-contrib-9.2.24-6.el7_9, postgresql-devel-9.2.24-6.el7_9 +8
- Red Hat Enterprise Linux ComputeNode Optional (v. 7) postgresql-9.2.24-6.el7_9, postgresql-contrib-9.2.24-6.el7_9, postgresql-devel-9.2.24-6.el7_9 +8
- Red Hat Enterprise Linux Server (v. 7) postgresql-9.2.24-6.el7_9, postgresql-9.2.24-6.el7_9.ppc, postgresql-contrib-9.2.24-6.el7_9 +10
- Red Hat Enterprise Linux Server Optional (v. 7) postgresql-static-9.2.24-6.el7_9, postgresql-static-9.2.24-6.el7_9.ppc, postgresql-upgrade-9.2.24-6.el7_9
- Red Hat Enterprise Linux Workstation (v. 7) postgresql-9.2.24-6.el7_9, postgresql-contrib-9.2.24-6.el7_9, postgresql-devel-9.2.24-6.el7_9 +6
- Red Hat Enterprise Linux Workstation Optional (v. 7) postgresql-docs-9.2.24-6.el7_9, postgresql-static-9.2.24-6.el7_9, postgresql-upgrade-9.2.24-6.el7_9
- RHSA-2021:0167 Released 2021-01-18 · Red Hat rating Importantpostgresql:9.6 security update
- Red Hat Enterprise Linux AppStream EUS (v. 8.1) postgresql-9.6.20-1.module+el8.1.0+9156+8ff1384f.aarch64::postgresql:9.6, postgresql-9.6.20-1.module+el8.1.0+9156+8ff1384f.ppc64le::postgresql:9.6, postgresql-9.6.20-1.module+el8.1.0+9156+8ff1384f.s390x::postgresql:9.6 +42
- RHSA-2021:0166 Released 2021-01-18 · Red Hat rating Importantpostgresql:10 security update
- Red Hat Enterprise Linux AppStream EUS (v. 8.1) postgresql-10.15-1.module+el8.1.0+9154+cd474635.aarch64::postgresql:10, postgresql-10.15-1.module+el8.1.0+9154+cd474635.ppc64le::postgresql:10, postgresql-10.15-1.module+el8.1.0+9154+cd474635.s390x::postgresql:10 +47
Show 10 more Red Hat advisories
- RHSA-2021:0164 Released 2021-01-18 · Red Hat rating Importantpostgresql:9.6 security update
- Red Hat Enterprise Linux AppStream EUS (v. 8.2) postgresql-9.6.20-1.module+el8.2.0+8939+9a3b4b64.aarch64::postgresql:9.6, postgresql-9.6.20-1.module+el8.2.0+8939+9a3b4b64.ppc64le::postgresql:9.6, postgresql-9.6.20-1.module+el8.2.0+8939+9a3b4b64.s390x::postgresql:9.6 +42
- RHSA-2021:0161 Released 2021-01-18 · Red Hat rating Importantpostgresql:10 security update
- Red Hat Enterprise Linux AppStream EUS (v. 8.2) postgresql-10.15-1.module+el8.2.0+8945+21c7d5de.aarch64::postgresql:10, postgresql-10.15-1.module+el8.2.0+8945+21c7d5de.ppc64le::postgresql:10, postgresql-10.15-1.module+el8.2.0+8945+21c7d5de.s390x::postgresql:10 +47
- RHSA-2021:0163 Released 2021-01-18 · Red Hat rating Importantpostgresql:12 security update
- Red Hat Enterprise Linux AppStream EUS (v. 8.2) pgaudit-1.4.0-4.module+el8.2.0+9043+1dbb5661.aarch64::postgresql:12, pgaudit-1.4.0-4.module+el8.2.0+9043+1dbb5661.ppc64le::postgresql:12, pgaudit-1.4.0-4.module+el8.2.0+9043+1dbb5661.s390x::postgresql:12 +47
- RHSA-2020:5664 Released 2020-12-22 · Red Hat rating Importantpostgresql:10 security update
- Red Hat Enterprise Linux AppStream E4S (v. 8.0) postgresql-10.15-1.module+el8.0.0+9155+4a85661a.ppc64le::postgresql:10, postgresql-10.15-1.module+el8.0.0+9155+4a85661a.src::postgresql:10, postgresql-10.15-1.module+el8.0.0+9155+4a85661a.x86_64::postgresql:10 +24
- RHSA-2020:5661 Released 2020-12-22 · Red Hat rating Importantpostgresql:9.6 security update
- Red Hat Enterprise Linux AppStream E4S (v. 8.0) postgresql-9.6.20-1.module+el8.0.0+9157+356b8def.ppc64le::postgresql:9.6, postgresql-9.6.20-1.module+el8.0.0+9157+356b8def.src::postgresql:9.6, postgresql-9.6.20-1.module+el8.0.0+9157+356b8def.x86_64::postgresql:9.6 +20
- RHSA-2020:5620 Released 2020-12-17 · Red Hat rating Importantpostgresql:12 security update
- Red Hat Enterprise Linux AppStream (v. 8) pgaudit-1.4.0-4.module+el8.3.0+9042+664538f4.aarch64::postgresql:12, pgaudit-1.4.0-4.module+el8.3.0+9042+664538f4.ppc64le::postgresql:12, pgaudit-1.4.0-4.module+el8.3.0+9042+664538f4.s390x::postgresql:12 +47
- RHSA-2020:5619 Released 2020-12-17 · Red Hat rating Importantpostgresql:9.6 security update
- Red Hat Enterprise Linux AppStream (v. 8) postgresql-9.6.20-1.module+el8.3.0+8938+7f0e88b6.aarch64::postgresql:9.6, postgresql-9.6.20-1.module+el8.3.0+8938+7f0e88b6.ppc64le::postgresql:9.6, postgresql-9.6.20-1.module+el8.3.0+8938+7f0e88b6.s390x::postgresql:9.6 +42
- RHSA-2020:5567 Released 2020-12-16 · Red Hat rating Importantpostgresql:10 security update
- Red Hat Enterprise Linux AppStream (v. 8) postgresql-10.15-1.module+el8.3.0+8944+1ca16b1f.aarch64::postgresql:10, postgresql-10.15-1.module+el8.3.0+8944+1ca16b1f.ppc64le::postgresql:10, postgresql-10.15-1.module+el8.3.0+8944+1ca16b1f.s390x::postgresql:10 +47
- RHSA-2020:5316 Released 2020-12-02 · Red Hat rating Importantrh-postgresql10-postgresql security update
- Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 7) rh-postgresql10-postgresql-10.15-1.el7, rh-postgresql10-postgresql-contrib-10.15-1.el7, rh-postgresql10-postgresql-contrib-syspaths-10.15-1.el7 +11
- Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.6) rh-postgresql10-postgresql-10.15-1.el7, rh-postgresql10-postgresql-contrib-10.15-1.el7, rh-postgresql10-postgresql-contrib-syspaths-10.15-1.el7 +11
- Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.7) rh-postgresql10-postgresql-10.15-1.el7, rh-postgresql10-postgresql-contrib-10.15-1.el7, rh-postgresql10-postgresql-contrib-syspaths-10.15-1.el7 +11
- Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 7) rh-postgresql10-postgresql-10.15-1.el7, rh-postgresql10-postgresql-contrib-10.15-1.el7, rh-postgresql10-postgresql-contrib-syspaths-10.15-1.el7 +11
- RHSA-2020:5317 Released 2020-12-02 · Red Hat rating Importantrh-postgresql12-postgresql security update
- Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 7) rh-postgresql12-postgresql-12.5-1.el7, rh-postgresql12-postgresql-contrib-12.5-1.el7, rh-postgresql12-postgresql-contrib-syspaths-12.5-1.el7 +11
- Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.6) rh-postgresql12-postgresql-12.5-1.el7, rh-postgresql12-postgresql-contrib-12.5-1.el7, rh-postgresql12-postgresql-contrib-syspaths-12.5-1.el7 +11
- Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.7) rh-postgresql12-postgresql-12.5-1.el7, rh-postgresql12-postgresql-contrib-12.5-1.el7, rh-postgresql12-postgresql-contrib-syspaths-12.5-1.el7 +11
- Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 7) rh-postgresql12-postgresql-12.5-1.el7, rh-postgresql12-postgresql-contrib-12.5-1.el7, rh-postgresql12-postgresql-contrib-syspaths-12.5-1.el7 +11
Vendor assessments
Red Hat
Red Hat rating: Important. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Enterprise Linux 5 | Affected | No fix planned: Out of support scope |
| Red Hat Enterprise Linux 6 | Affected | No fix planned: Out of support scope |
| Red Hat Storage 3 | Affected | No fix planned: Out of support scope |
| Red Hat Enterprise Linux AppStream (v. 8) | Fixed | RHSA-2020:5567, RHSA-2020:5619, RHSA-2020:5620 |
| Red Hat Enterprise Linux AppStream E4S (v. 8.0) | Fixed | RHSA-2020:5661, RHSA-2020:5664 |
| Red Hat Enterprise Linux AppStream EUS (v. 8.1) | Fixed | RHSA-2021:0166, RHSA-2021:0167 |
| Red Hat Enterprise Linux AppStream EUS (v. 8.2) | Fixed | RHSA-2021:0161, RHSA-2021:0163, RHSA-2021:0164 |
| Red Hat Enterprise Linux Client (v. 7) | Fixed | RHSA-2021:1512 |
| Red Hat Enterprise Linux Client Optional (v. 7) | Fixed | RHSA-2021:1512 |
| Red Hat Enterprise Linux ComputeNode Optional (v. 7) | Fixed | RHSA-2021:1512 |
| Red Hat Enterprise Linux Server (v. 7) | Fixed | RHSA-2021:1512 |
| Red Hat Enterprise Linux Server Optional (v. 7) | Fixed | RHSA-2021:1512 |
| Red Hat Enterprise Linux Workstation (v. 7) | Fixed | RHSA-2021:1512 |
| Red Hat Enterprise Linux Workstation Optional (v. 7) | Fixed | RHSA-2021:1512 |
| Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 7) | Fixed | RHSA-2020:5316, RHSA-2020:5317 |
| Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.6) | Fixed | RHSA-2020:5316, RHSA-2020:5317 |
| Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.7) | Fixed | RHSA-2020:5316, RHSA-2020:5317 |
| Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 7) | Fixed | RHSA-2020:5316, RHSA-2020:5317 |
Not affected: 8 products
- Red Hat Decision Manager 7
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
- Red Hat Fuse 7
- Red Hat JBoss Enterprise Application Platform 6
- Red Hat JBoss Enterprise Application Platform 7
- Red Hat Process Automation 7
- Red Hat build of Quarkus
Timeline
- 2026-10-02 Threatist record created from CVE-2020-25695
- 2026-10-03 Alias added: GHSA-xgxp-9x8p-gcw4
References
Sources
- CVE-2020-25695 · CVE Program
- CVE-2020-25695 · NVD
- FIRST EPSS
- GHSA-xgxp-9x8p-gcw4 · GitHub Advisory Database · CC BY 4.0
- CVE-2020-25695 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences