What’s Vulnerable › Vulnerabilities
CVE-2021-23214
- Severity: high (CVSS 8.1 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 1.9% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2022-03-04 · updated 2026-06-17
- Weakness: CWE-89
Description
When the server is configured to use trust authentication with a clientcert requirement or to use cert authentication, a man-in-the-middle attacker can inject arbitrary SQL queries when a connection is first established, despite the use of SSL certificate verification and encryption.
Affected products
- Fedoraproject Fedora: 34, 35
- PostgreSQL: before 9.6.24; from 10.0 before 10.19; from 11.0 before 11.14; from 12.0 before 12.9; from 13.0 before 13.5; 14.0 — fixed in 10.19, 11.14, 12.9, 13.5, 9.6.24
- Red Hat Enterprise Linux: 8.0
- RedHat Enterprise Linux For Ibm Z Systems: 8.0
- RedHat Enterprise Linux For Power Little Endian: 8.0
- RedHat Software Collections: 1.0
How to fix
Upgrade to a fixed version: PostgreSQL 10.19, 11.14, 12.9, 13.5. Check the vendor advisory for mitigations.
References
- https://bugzilla.redhat.com/show_bug.cgi?id=2022666
- https://git.postgresql.org/gitweb/?p=postgresql.git%3Ba=commit%3Bh=28e24125541545483093819efae9bca603441951
- https://github.com/postgres/postgres/commit/28e24125541545483093819efae9bca603441951
- https://security.gentoo.org/glsa/202211-04
- https://www.postgresql.org/support/security/CVE-2021-23214/
- https://bugzilla.redhat.com/show_bug.cgi?id=2022666
- https://git.postgresql.org/gitweb/?p=postgresql.git%3Ba=commit%3Bh=28e24125541545483093819efae9bca603441951
- https://github.com/postgres/postgres/commit/28e24125541545483093819efae9bca603441951
- https://security.gentoo.org/glsa/202211-04
- https://www.postgresql.org/support/security/CVE-2021-23214/
Get alerted when CVE-2021-23214 or the next vulnerability affects your stack