Incorrect comparison in PostgreSQL
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- High
- Impact type
- —
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Partial Red Hat: 8 fixed, 4 without a fix
Attack profile from CVSS 3.1 · NVD. Fix status from CNA and Red Hat.
Summary
A flaw was found in the psql interactive terminal of PostgreSQL in versions before 13.1, before 12.5, before 11.10, before 10.15, before 9.6.20 and before 9.5.24. If an interactive psql session uses \gset when querying a compromised server, the attacker can execute arbitrary code as the operating system account running psql. 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:*:*:*:*:*:*:*:* | 9.5.0 to 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 9.5.0 to 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 16 advisories
- 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
- RHSA-2021:0165 Released 2021-01-18 · Red Hat rating Importantlibpq security update
- Red Hat Enterprise Linux AppStream EUS (v. 8.1) libpq-12.5-2.el8_1, libpq-devel-12.5-2.el8_1
Show 13 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-2021:0057 Released 2021-01-11 · Red Hat rating Importantlibpq security update
- Red Hat Enterprise Linux AppStream EUS (v. 8.2) libpq-12.5-1.el8_2, libpq-devel-12.5-1.el8_2
- 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:5638 Released 2020-12-21 · Red Hat rating Importantlibpq security update
- Red Hat Enterprise Linux AppStream E4S (v. 8.0) libpq-12.5-1.el8_0, libpq-devel-12.5-1.el8_0
- 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:5401 Released 2020-12-14 · Red Hat rating Importantlibpq security update
- Red Hat Enterprise Linux AppStream (v. 8) libpq-12.5-1.el8_3, libpq-devel-12.5-1.el8_3
- 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: Moderate. 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 Enterprise Linux 7 | 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:5401, RHSA-2020:5567, RHSA-2020:5619, RHSA-2020:5620 |
| Red Hat Enterprise Linux AppStream E4S (v. 8.0) | Fixed | RHSA-2020:5638, RHSA-2020:5661, RHSA-2020:5664 |
| Red Hat Enterprise Linux AppStream EUS (v. 8.1) | Fixed | RHSA-2021:0165, RHSA-2021:0166, RHSA-2021:0167 |
| Red Hat Enterprise Linux AppStream EUS (v. 8.2) | Fixed | RHSA-2021:0057, RHSA-2021:0161, RHSA-2021:0163, RHSA-2021:0164 |
| 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: 7 products
- Red Hat Decision Manager 7
- 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-25696
- 2026-10-03 Alias added: GHSA-rfp5-6w27-jrq7
References
Sources
- CVE-2020-25696 · CVE Program
- CVE-2020-25696 · NVD
- FIRST EPSS
- GHSA-rfp5-6w27-jrq7 · GitHub Advisory Database · CC BY 4.0
- CVE-2020-25696 · 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