Vulnerability · Published Mar 4, 2022 · Assigned by redhat
CVE-2021-23214
High 8.1
In plain English
A high-severity SQL injection in postgresql. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 1.9% (higher than 80% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Severity (CVSS NVD)8.1High
Exploit odds (30 days)1.9%top 20.2% of all CVEs
Exploited in the wildNo reportsnot in CISA KEV
Attack toolingNoneno public tooling known
Official 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 packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux:8 | pg_repack | 1.4.6-3.module_el8.6.0+2760+1746ec94 | ALSA-2021:5236 |
| AlmaLinux:8 | pg_repack | 1.4.6-3.module_el8.6.0+2758+4f4474df | ALSA-2021:5235 |
| AlmaLinux:8 | pg_repack | 1.4.6-3.module_el8.6.0+2760+1746ec94 | ALSA-2021:5235 |
| AlmaLinux:8 | pg_repack | 1.4.6-3.module_el8.5.0+2606+4554acc4 | ALSA-2021:5235 |
| AlmaLinux:8 | pg_repack | 1.4.6-3.module_el8.5.0+2607+8c0fd184 | ALSA-2021:5236 |
| AlmaLinux:8 | pg_repack | 1.4.6-3.module_el8.6.0+2758+4f4474df | ALSA-2021:5236 |
| AlmaLinux:8 | pgaudit | 1.5.0-1.module_el8.5.0+2607+8c0fd184 | ALSA-2021:5236 |
| AlmaLinux:8 | pgaudit | 1.4.0-5.module_el8.6.0+2758+4f4474df | ALSA-2021:5235 |
| AlmaLinux:8 | pgaudit | 1.4.0-5.module_el8.5.0+2606+4554acc4 | ALSA-2021:5235 |
| AlmaLinux:8 | pgaudit | 1.5.0-1.module_el8.6.0+2760+1746ec94 | ALSA-2021:5236 |
| AlmaLinux:8 | postgres-decoderbufs | 0.10.0-2.module_el8.6.0+2760+1746ec94 | ALSA-2021:5236 |
| AlmaLinux:8 | postgres-decoderbufs | 0.10.0-2.module_el8.5.0+2606+4554acc4 | ALSA-2021:5235 |
| AlmaLinux:8 | postgres-decoderbufs | 0.10.0-2.module_el8.6.0+2760+1746ec94 | ALSA-2021:5235 |
| AlmaLinux:8 | postgres-decoderbufs | 0.10.0-2.module_el8.6.0+2758+4f4474df | ALSA-2021:5235 |
| AlmaLinux:8 | postgres-decoderbufs | 0.10.0-2.module_el8.6.0+2758+4f4474df | ALSA-2021:5236 |
| AlmaLinux:8 | postgres-decoderbufs | 0.10.0-2.module_el8.5.0+2607+8c0fd184 | ALSA-2021:5236 |
| AlmaLinux:8 | postgresql | 12.9-1.module_el8.5.0+2606+4554acc4 | ALSA-2021:5235 |
| AlmaLinux:8 | postgresql | 13.5-1.module_el8.5.0+2607+8c0fd184 | ALSA-2021:5236 |
| AlmaLinux:8 | postgresql | 10.19-1.module_el8.6.0+2744+ce3fc19a | ALSA-2022:1830 |
| AlmaLinux:8 | postgresql-contrib | 12.9-1.module_el8.5.0+2606+4554acc4 | ALSA-2021:5235 |
| AlmaLinux:8 | postgresql-contrib | 13.5-1.module_el8.5.0+2607+8c0fd184 | ALSA-2021:5236 |
| AlmaLinux:8 | postgresql-contrib | 10.19-1.module_el8.6.0+2744+ce3fc19a | ALSA-2022:1830 |
| AlmaLinux:8 | postgresql-docs | 12.9-1.module_el8.5.0+2606+4554acc4 | ALSA-2021:5235 |
| AlmaLinux:8 | postgresql-docs | 13.5-1.module_el8.5.0+2607+8c0fd184 | ALSA-2021:5236 |
| AlmaLinux:8 | postgresql-docs | 10.19-1.module_el8.6.0+2744+ce3fc19a | ALSA-2022:1830 |
| AlmaLinux:8 | postgresql-plperl | 10.19-1.module_el8.6.0+2744+ce3fc19a | ALSA-2022:1830 |
| AlmaLinux:8 | postgresql-plperl | 13.5-1.module_el8.5.0+2607+8c0fd184 | ALSA-2021:5236 |
| AlmaLinux:8 | postgresql-plperl | 12.9-1.module_el8.5.0+2606+4554acc4 | ALSA-2021:5235 |
| AlmaLinux:8 | postgresql-plpython3 | 10.19-1.module_el8.6.0+2744+ce3fc19a | ALSA-2022:1830 |
| AlmaLinux:8 | postgresql-plpython3 | 12.9-1.module_el8.5.0+2606+4554acc4 | ALSA-2021:5235 |
| AlmaLinux:8 | postgresql-plpython3 | 13.5-1.module_el8.5.0+2607+8c0fd184 | ALSA-2021:5236 |
| AlmaLinux:8 | postgresql-pltcl | 13.5-1.module_el8.5.0+2607+8c0fd184 | ALSA-2021:5236 |
| AlmaLinux:8 | postgresql-pltcl | 12.9-1.module_el8.5.0+2606+4554acc4 | ALSA-2021:5235 |
| AlmaLinux:8 | postgresql-pltcl | 10.19-1.module_el8.6.0+2744+ce3fc19a | ALSA-2022:1830 |
| AlmaLinux:8 | postgresql-server | 10.19-1.module_el8.6.0+2744+ce3fc19a | ALSA-2022:1830 |
| AlmaLinux:8 | postgresql-server | 12.9-1.module_el8.5.0+2606+4554acc4 | ALSA-2021:5235 |
| AlmaLinux:8 | postgresql-server | 13.5-1.module_el8.5.0+2607+8c0fd184 | ALSA-2021:5236 |
| AlmaLinux:8 | postgresql-server-devel | 10.19-1.module_el8.6.0+2744+ce3fc19a | ALSA-2022:1830 |
| AlmaLinux:8 | postgresql-server-devel | 13.5-1.module_el8.5.0+2607+8c0fd184 | ALSA-2021:5236 |
| AlmaLinux:8 | postgresql-server-devel | 12.9-1.module_el8.5.0+2606+4554acc4 | ALSA-2021:5235 |
| AlmaLinux:8 | postgresql-static | 10.19-1.module_el8.6.0+2744+ce3fc19a | ALSA-2022:1830 |
| AlmaLinux:8 | postgresql-static | 12.9-1.module_el8.5.0+2606+4554acc4 | ALSA-2021:5235 |
| AlmaLinux:8 | postgresql-static | 13.5-1.module_el8.5.0+2607+8c0fd184 | ALSA-2021:5236 |
| AlmaLinux:8 | postgresql-test | 12.9-1.module_el8.5.0+2606+4554acc4 | ALSA-2021:5235 |
| AlmaLinux:8 | postgresql-test | 13.5-1.module_el8.5.0+2607+8c0fd184 | ALSA-2021:5236 |
| AlmaLinux:8 | postgresql-test | 10.19-1.module_el8.6.0+2744+ce3fc19a | ALSA-2022:1830 |
| AlmaLinux:8 | postgresql-test-rpm-macros | 12.9-1.module_el8.5.0+2606+4554acc4 | ALSA-2021:5235 |
| AlmaLinux:8 | postgresql-test-rpm-macros | 13.5-1.module_el8.5.0+2607+8c0fd184 | ALSA-2021:5236 |
| AlmaLinux:8 | postgresql-test-rpm-macros | 10.19-1.module_el8.6.0+2744+ce3fc19a | ALSA-2022:1830 |
| AlmaLinux:8 | postgresql-upgrade | 12.9-1.module_el8.5.0+2606+4554acc4 | ALSA-2021:5235 |
| AlmaLinux:8 | postgresql-upgrade | 10.19-1.module_el8.6.0+2744+ce3fc19a | ALSA-2022:1830 |
| AlmaLinux:8 | postgresql-upgrade | 13.5-1.module_el8.5.0+2607+8c0fd184 | ALSA-2021:5236 |
| AlmaLinux:8 | postgresql-upgrade-devel | 13.5-1.module_el8.5.0+2607+8c0fd184 | ALSA-2021:5236 |
| AlmaLinux:8 | postgresql-upgrade-devel | 12.9-1.module_el8.5.0+2606+4554acc4 | ALSA-2021:5235 |
| AlmaLinux:8 | postgresql-upgrade-devel | 10.19-1.module_el8.6.0+2744+ce3fc19a | ALSA-2022:1830 |
| Alpine:v3.20 | postgresql14 | 14.1-r0 | ALPINE-CVE-2021-23214 |
| Alpine:v3.20 | postgresql15 | 14.1-r0 | ALPINE-CVE-2021-23214 |
| Rocky Linux:8 | pg_repack | 0:1.4.6-3.module+el8.5.0+684+c3892ef9 | RLSA-2021:5236 |
| Rocky Linux:8 | pg_repack | 0:1.4.6-3.module+el8.5.0+684+c3892ef9 | RLSA-2021:5235 |
| Rocky Linux:8 | pgaudit | 0:1.4.0-5.module+el8.5.0+686+20453ecc | RLSA-2021:5235 |
| Rocky Linux:8 | pgaudit | 0:1.5.0-1.module+el8.5.0+684+c3892ef9 | RLSA-2021:5236 |
| Rocky Linux:8 | pgaudit | 0:1.5.0-1.module+el8.4.0+546+3620623e | RLSA-2021:5236 |
| Rocky Linux:8 | postgres-decoderbufs | 0:0.10.0-2.module+el8.5.0+684+c3892ef9 | RLSA-2021:5236 |
| Rocky Linux:8 | postgres-decoderbufs | 0:0.10.0-2.module+el8.4.0+424+71d47d9a | RLSA-2021:5235 |
| Rocky Linux:8 | postgres-decoderbufs | 0:0.10.0-2.module+el8.5.0+684+c3892ef9 | RLSA-2021:5235 |
| Rocky Linux:8 | postgres-decoderbufs | 0:0.10.0-2.module+el8.4.0+424+71d47d9a | RLSA-2021:5236 |
| Rocky Linux:8 | postgresql | 0:10.19-1.module+el8.6.0+802+f92d3c38 | RLSA-2022:1830 |
| Rocky Linux:8 | postgresql | 0:13.5-1.module+el8.5.0+725+42e826de | RLSA-2021:5236 |
| Rocky Linux:8 | postgresql | 0:12.9-1.module+el8.5.0+724+9de6e501 | RLSA-2021:5235 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| n/a | postgresql | Affects v9.6 to v14 |
Weakness: CWE-89
References
- https://bugzilla.redhat.com/show_bug.cgi?id=2022666
- https://www.postgresql.org/support/security/CVE-2021-23214/
- https://git.postgresql.org/gitweb/?p=postgresql.git%3Ba=commit%3Bh=28e24125541545483093819efae9bca603441951
- https://github.com/postgres/postgres/commit/28e24125541545483093819efae9bca603441951
- GLSA-202211-04 vendor-advisory