First published: Wed Nov 04 2020(Updated: )
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.
Credit: secalert@redhat.com
Affected Software | Affected Version | How to fix |
---|---|---|
redhat/libpq | <0:12.5-1.el8_3 | 0:12.5-1.el8_3 |
redhat/libpq | <0:12.5-1.el8_0 | 0:12.5-1.el8_0 |
redhat/libpq | <0:12.5-2.el8_1 | 0:12.5-2.el8_1 |
redhat/libpq | <0:12.5-1.el8_2 | 0:12.5-1.el8_2 |
redhat/rh-postgresql10-postgresql | <0:10.15-1.el7 | 0:10.15-1.el7 |
redhat/rh-postgresql12-postgresql | <0:12.5-1.el7 | 0:12.5-1.el7 |
redhat/postgresql | <13.1 | 13.1 |
redhat/postgresql | <12.5 | 12.5 |
redhat/postgresql | <11.10 | 11.10 |
redhat/postgresql | <10.15 | 10.15 |
redhat/postgresql | <9.6.20 | 9.6.20 |
redhat/postgresql | <9.5.24 | 9.5.24 |
PostgreSQL PostgreSQL | >=9.5.0<9.5.24 | |
PostgreSQL PostgreSQL | >=9.6.0<9.6.20 | |
PostgreSQL PostgreSQL | >=10.0<10.15 | |
PostgreSQL PostgreSQL | >=11.0<11.10 | |
PostgreSQL PostgreSQL | >=12.0<12.5 | |
PostgreSQL PostgreSQL | >=13.0<13.1 | |
Debian Debian Linux | =9.0 |
Using \gset with a prefix not found among specially treated variables, e.g. any lowercase string, precludes the attack in an unpatched psql.
Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.
(Appears in the following advisories)
CVE-2020-25696 is a vulnerability in the psql interactive terminal of PostgreSQL that allows an attacker to execute arbitrary code as the operating system user.
CVE-2020-25696 affects versions before 13.1, before 12.5, before 11.10, before 10.15, before 9.6.20, and before 9.5.24 of PostgreSQL.
CVE-2020-25696 has a severity rating of 7.5, which is considered high.
To fix CVE-2020-25696, upgrade to version 13.1 or later if you are using PostgreSQL 13, version 12.5 or later if you are using PostgreSQL 12, version 11.10 or later if you are using PostgreSQL 11, version 10.15 or later if you are using PostgreSQL 10, version 9.6.20 or later if you are using PostgreSQL 9.6, or version 9.5.24 or later if you are using PostgreSQL 9.5.
You can find more information about CVE-2020-25696 on the Red Hat Bugzilla website. [Link 1](https://bugzilla.redhat.com/show_bug.cgi/show_bug.cgi?id=1897233) [Link 2](https://bugzilla.redhat.com/show_bug.cgi/show_bug.cgi?id=1897230) [Link 3](https://bugzilla.redhat.com/show_bug.cgi/show_bug.cgi?id=1897227)