CVE-2021-23222 json
A man-in-the-middle attacker can inject false responses to the client's first few queries, despite the use of SSL certificate verification…
published 2022-03-02 4 y ago modified 2026-09-08 2 mo ago also BIT-postgresql-2021-23222 , EUVD-2021-10324 , JLSEC-2026-30
- cvss
- 5.9
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.5%
- EPSS 1.5% chance of exploitation in 30 days, percentile 74%
- public exploits
- 0
- none known
Summary
A man-in-the-middle attacker can inject false responses to the client's first few queries, despite the use of SSL certificate verification and encryption.
Patch / fix
- bitnami postgresql 9.6.24, 10.19.0, 11.14.0, 12.9.0, 13.5.0, 14.0.1
- julia LibPQ_jll 14.1.0+0
- postgresql postgresql 9.6.24, 10.19, 11.14, 12.9, 13.5
- postgresql-13 Debian 11 13.5-0+deb11u1
debian advisories DEBIAN-CVE-2021-23222
- postgresql-10 Ubuntu 18.04 LTS 10.19-0ubuntu0.18.04.1
- postgresql-12 Ubuntu 20.04 LTS 12.9-0ubuntu0.20.04.1
- postgresql-9.5 Ubuntu Pro 16.04 LTS 9.5.25-0ubuntu0.16.04.1+esm3
ubuntu advisories UBUNTU-CVE-2021-23222
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- libpq RHEL 8 13.5-1.el8
- rh-postgresql13-postgresql RHEL 3 SOFTWARE_COLLECTIONS 13.5-1.el7
- rh-postgresql13-postgresql-libs RHEL 3 SOFTWARE_COLLECTIONS 13.5-1.el7
- rh-postgresql13-postgresql-test RHEL 3 SOFTWARE_COLLECTIONS 13.5-1.el7
- rh-postgresql13-postgresql-pltcl RHEL 3 SOFTWARE_COLLECTIONS 13.5-1.el7
- rh-postgresql13-postgresql-plperl RHEL 3 SOFTWARE_COLLECTIONS 13.5-1.el7
- rh-postgresql13-postgresql-server RHEL 3 SOFTWARE_COLLECTIONS 13.5-1.el7
- rh-postgresql13-postgresql-contrib RHEL 3 SOFTWARE_COLLECTIONS 13.5-1.el7
red hat advisories RHSA-2022:1891RHSA-2021:5179RHSA-2021:5197
- postgresql12 SLES for SAP 15 SP1, SLES 15 SP1-LTSS, SLES 15 SP1-BCL +3 more 12.12-150100.3.33.1
- postgresql10 SLES for SAP 15, SLES 15-LTSS, SLE High Performance Computing 15-LTSS +1 more 10.22-150000.4.42.1
- postgresql SLES for SAP 15 SP1, SLES for SAP 15, SLES 15-LTSS +7 more 12.0.1-150000.8.19.1
- postgresql10 SLES for SAP 15 SP1, SLES 15 SP1-LTSS, SLES 15 SP1-BCL +6 more 10.19-8.41.1
- postgresql13 SLE Module for Server Applications 15 SP3, SLE Module for Server Applications 15 SP2, SLE Module for Package Hub 15 SP3 +3 more 13.5-5.22.1
- postgresql10 SLES for SAP 12 SP5, SLES for SAP 12 SP4, SLES for SAP 12 SP3 +11 more 10.19-4.22.1
- postgresql12 SLES for SAP 12 SP5, SLES 12 SP5, SLE Software Development Kit 12 SP5 12.9-3.21.1
- postgresql14 SLE Module for Server Applications 15 SP3, SLE Module for Server Applications 15 SP2, SLE Module for Package Hub 15 SP3 +3 more 14.1-5.6.1
suse advisories SUSE-SU-2022:2958-1SUSE-SU-2022:2893-1SUSE-SU-2021:4058-1SUSE-SU-2021:3762-1SUSE-SU-2021:3761-1SUSE-SU-2021:3760-1
- postgresql17 openSUSE Tumbleweed 17.6-2.1
- postgresql16 openSUSE Tumbleweed 16.4-1.1
- postgresql10 openSUSE Tumbleweed 10.19-1.1
- postgresql11 openSUSE Tumbleweed 11.14-1.1
- postgresql12 openSUSE Tumbleweed 12.9-1.1
- postgresql13 openSUSE Tumbleweed 13.5-1.1
- postgresql14 openSUSE Tumbleweed 14.1-1.1
- postgresql15 openSUSE Tumbleweed 15.4-2.1
opensuse advisories openSUSE-SU-2025:15580-1openSUSE-SU-2024:14360-1openSUSE-SU-2024:11625-1openSUSE-SU-2024:11626-1openSUSE-SU-2024:11627-1openSUSE-SU-2024:11628-1
- libpq AlmaLinux 8 13.5-1.el8
almalinux advisories ALSA-2022:1891
- libpq Rocky Linux 8 13.5-1.el8
rocky linux advisories RLSA-2022:1891
- postgresql Alpine 3.12, Alpine 3.11 12.9-r0
- postgresql Alpine 3.14, Alpine 3.13 13.5-r0
- postgresql12 Alpine 3.18, Alpine 3.17, Alpine 3.16 +1 more 12.9-r0
- postgresql13 Alpine 3.19, Alpine 3.18, Alpine 3.17 +2 more 13.5-r0
- postgresql14 Alpine 3.20, Alpine 3.19, Alpine 3.18 +3 more 14.1-r0
- postgresql15 Alpine 3.20, Alpine 3.19, Alpine 3.18 +1 more 14.1-r0
alpine advisories ALPINE-CVE-2021-23222
Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- postgresql CBL-Mariner 2.0 14.2-1
azure linux advisories AZL-8901
Azure Linux vulnerability data, Copyright (c) Microsoft Corporation, from https://github.com/microsoft/AzureLinuxVulnerabilityData via OSV, under the MIT licence; changed: normalised to fixed package versions per release. MIT
- postgresql Arch Linux 13.5-1
- postgresql-libs Arch Linux 13.5-1
arch linux advisories AVG-2547
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2021-23222 updated cvss 3.7
postgresql: libpq processes unencrypted bytes from man-in-the-middle
-
Red Hat Enterprise Linux 5 postgresql Red Hat Enterprise Linux 6 postgresql, postgresql-libs, postgresql-test, postgresql-pltcl, postgresql-plperl, postgresql-server, +2 more Red Hat Enterprise Linux 7 postgresql, postgresql-libs, postgresql-test, postgresql-pltcl, postgresql-plperl, postgresql-server, +3 moreaffected: no fix planned “Out of support scope”
-
Red Hat Software Collections rh-postgresql10-postgresql, rh-postgresql10-postgresql-libs, rh-postgresql10-postgresql-test, rh-postgresql10-postgresql-pltcl, rh-postgresql10-postgresql-plperl, rh-postgresql10-postgresql-server, +5 moreaffected: no fix available “Fix deferred”
-
Red Hat Enterprise Linux AppStream (v. 8) libpq 13.5-1.el8fixed: vendor fix RHSA-2022:1891
-
Red Hat Software Collections for RHEL Workstation(v. 7) rh-postgresql12-postgresql 12.9-1.el7, rh-postgresql13-postgresql 13.5-1.el7, rh-postgresql12-postgresql-libs 12.9-1.el7, rh-postgresql12-postgresql-test 12.9-1.el7, rh-postgresql13-postgresql-libs 13.5-1.el7, rh-postgresql13-postgresql-test 13.5-1.el7, +17 more Red Hat Software Collections for RHEL(v. 7) rh-postgresql12-postgresql 12.9-1.el7, rh-postgresql13-postgresql 13.5-1.el7, rh-postgresql12-postgresql-libs 12.9-1.el7, rh-postgresql12-postgresql-test 12.9-1.el7, rh-postgresql13-postgresql-libs 13.5-1.el7, rh-postgresql13-postgresql-test 13.5-1.el7, +17 morefixed: vendor fix RHSA-2021:5197
-
Red Hat build of Debezium 1 postgresql Red Hat build of Quarkus postgresql Red Hat Decision Manager 7 postgresql Red Hat Enterprise Linux 8 pgaudit, pg_repack, postgresql, postgresql-test, postgresql-pltcl, postgresql-plperl, +7 more Red Hat Enterprise Linux 9 libpq, postgresql, postgresql-test, postgresql-pltcl, postgresql-plperl, postgresql-server, +5 more Red Hat Fuse 7 postgresqlnot affected: vulnerable code not present
+6 more productsfewer
Red Hat Integration Camel K 1 postgresql Red Hat Integration Camel Quarkus 1 postgresql Red Hat Integration Service Registry postgresql Red Hat JBoss Fuse 6 postgresql Red Hat JBoss Operations Network 3 postgresql Red Hat Process Automation 7 postgresql
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
1.50% chance of exploitation in the next 30 days, higher than 74% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 5.9 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N |
| NVD | 2.0 | 4.3 | AV:N/AC:M/Au:N/C:P/I:N/A:N |
| OSV | 3.1 | 5.9 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| bitnami | postgresql | >=9.6.0, <9.6.24 >=10.0.0, <10.19.0 >=11.0.0, <11.14.0 >=12.0.0, <12.9.0 >=13.0.0, <13.5.0 >=14.0.0, <14.0.1 |
9.6.24 10.19.0 11.14.0 12.9.0 13.5.0 14.0.1 |
| julia | LibPQ_jll | <14.1.0+0 |
14.1.0+0 |
Affected products
- n/a postgresql
Classification
- Weakness
-
- CWE-522 Insufficiently Protected Credentials
- Technology feeds
References
-
github.com
/postgres/postgres/commit/160c0258802d10b0600d7671b1bbea55d8e17d45
patch, third-party-advisory, advisory, web
-
security.gentoo.org
/glsa/202211-04
vendor-advisory, third-party-advisory, advisory, web
-
postgresql.org
/support/security/CVE-2021-23222/
release-notes, vendor-advisory, advisory, web
-
bugzilla.redhat.com
/show_bug.cgi?id=2022675
issue-tracking, third-party-advisory, advisory, web
-
git.postgresql.org
/gitweb/?p=postgresql.git%3Ba=commitdiff%3Bh=d83cdfdca9d918bbbd6bb209139b94c954da7228
web
-
nvd.nist.gov
/vuln/detail/CVE-2021-23222
web
Sources
- CVE List CVE-2021-23222
- NVD CVE-2021-23222
- OSV BIT-postgresql-2021-23222
- OSV JLSEC-2026-30
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.