CVE-2020-25696
The \gset meta-command, which sets psql variables based on query results, does not distinguish variables that control psql behavior. 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 . Using \gset with a prefix not found among specially treated variables, e.g. any lowercase string, precludes the attack in an unpatched psql .
The PostgreSQL project thanks Nick Cleaton for reporting this problem.
Version Information
| Affected branch | Introduced | Fixed In | Fix Published |
|---|
| 10 | — | 10.15 | 2020-11-12 |
| 11 | — | 11.10 | 2020-11-12 |
| 12 | — | 12.5 | 2020-11-12 |
| 13 | — | 13.1 | 2020-11-12 |
| 9.5 | — | 9.5.24 | 2020-11-12 |
| 9.6 | — | 9.6.20 | 2020-11-12 |
CVSS 3.0
| Overall Score | 7.5 |
|---|
| Component | client |
|---|
| Vector | AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H |
|---|
First published: 2020-11-12
Original security advisory · JSON · All advisories