CVE-2021-23214: When the server is configured to use trust authentication with a clientcert requirement or to use cert authentication, a man-in-the-middle…
Noroxi assessment
Priority: Monitor (action score 33/100)
- The sources we track (CISA KEV, Exploit-DB, Metasploit, Nuclei, GitHub) show no public exploit code or exploitation in the wild.
- Probability of exploitation in the next 30 days: 1.9% (FIRST EPSS); higher than 80% of all records.
- Anyone who can reach it over the internet can trigger it. No account or password is required. No user action is required. Special conditions such as timing or configuration are required.
- Fixed version: pg_repack (AlmaLinux:8) 1.4.6-3.module_el8.6.0+2758+4f4474df, 1.4.6-3.module_el8.5.0+2606+4554acc4, 1.4.6-3.module_el8.6.0+2760+1746ec94; pgaudit (AlmaLinux:8) 1.5.0-1.module_el8.5.0+2607+8c0fd184, 1.4.0-5.module_el8.6.0+2758+4f4474df, 1.4.0-5.module_el8.5.0+2606+4554acc4; postgres-decoderbufs (AlmaLinux:8) 0.10.0-2.module_el8.6.0+2758+4f4474df, 0.10.0-2.module_el8.5.0+2606+4554acc4, 0.10.0-2.module_el8.6.0+2760+1746ec94.
- Mentioned 2 times in Turkish national cyber security advisories (siberguvenlik.gov.tr).
Low priority for now. Upgrade to pg_repack (AlmaLinux:8) 1.4.6-3.module_el8.6.0+2758+4f4474df, 1.4.6-3.module_el8.5.0+2606+4554acc4, 1.4.6-3.module_el8.6.0+2760+1746ec94; pgaudit (AlmaLinux:8) 1.5.0-1.module_el8.5.0+2607+8c0fd184, 1.4.0-5.module_el8.6.0+2758+4f4474df, 1.4.0-5.module_el8.5.0+2606+4554acc4; postgres-decoderbufs (AlmaLinux:8) 0.10.0-2.module_el8.6.0+2758+4f4474df, 0.10.0-2.module_el8.5.0+2606+4554acc4, 0.10.0-2.module_el8.6.0+2760+1746ec94 or later.
Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it
Primary sources: NVD · CVE.org · FIRST EPSS
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.
- BDU:2021-05857
- BDU:2021-05996
- ALSA-2021:5235
- ALSA-2021:5236
- ALSA-2022:1830
- DLA-2817-1
- DSA-5006-1
- DSA-5007-1
- openSUSE-SU-2021:1584-1
- openSUSE-SU-2021:3758-1
- openSUSE-SU-2021:3759-1
- openSUSE-SU-2021:3762-1
- openSUSE-SU-2021:4058-1
- openSUSE-SU-2024:11625-1
- openSUSE-SU-2024:11626-1
- openSUSE-SU-2024:11627-1
- openSUSE-SU-2024:11628-1
- openSUSE-SU-2024:11629-1
- openSUSE-SU-2024:13243-1
- openSUSE-SU-2024:14360-1
- Published
- Mar 4, 2022
- Updated
- Jun 16, 2026
- EPSS
- 1.9% · 80th percentile
- CWE
- CWE-89
Report tools
Action score
33
Low priority for now.
- CVSS
- 32 / 40 · 8.1 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 1 / 30 · 1.9%
Get told when this record changes
- Not in KEV: no record of exploitation in the wild
- No public exploit code on record
- A fix has been released
If any of these changes, we'll tell you in the daily email digest.
Is PostgreSQL on your server exposed to the internet?Run a port scan
Is your version affected? Check itNoroxi analysis
What does it mean in your environment?
The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.
We use this product, ask for helpAffected systems
Is your version affected?
Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.
| Vendor | Product | CPE |
|---|---|---|
| postgresql | postgresql | cpe:2.3:a:postgresql:postgresql |
| fedoraproject | fedora | cpe:2.3:o:fedoraproject:fedora |
| redhat | software collections | cpe:2.3:a:redhat:software_collections |
| redhat | enterprise linux | cpe:2.3:o:redhat:enterprise_linux |
| redhat | enterprise linux for ibm z systems | cpe:2.3:o:redhat:enterprise_linux_for_ibm_z_systems |
| redhat | enterprise linux for power little endian | cpe:2.3:o:redhat:enterprise_linux_for_power_little_endian |
Using postgresql? Add it to your stack and be the first to know about CVEs like this one. (PostgreSQL)
Is PostgreSQL on your server exposed to the internet?
The free port scanner finds the open ports on your server and matches the service versions it can read against known vulnerabilities. No account needed.
Run a port scanVersions reported by the vendor
Affected version ranges reported by the assigning authority (redhat). Independent of NVD's CPE analysis and usually ahead of it.
n/a postgresql
- Affects v9.6 to v14affected
Affected versions · NVD (6)
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- postgresql postgresqlbefore 9.6.24
- postgresql postgresql10.0 and later · before 10.19
- postgresql postgresql11.0 and later · before 11.14
- postgresql postgresql12.0 and later · before 12.9
- postgresql postgresql13.0 and later · before 13.5
- postgresql postgresql14.0
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| AlmaLinux:8 | pg_repack | before 1.4.6-3.module_el8.6.0+2758+4f4474df | 1.4.6-3.module_el8.6.0+2758+4f4474df |
| AlmaLinux:8 | pg_repack | before 1.4.6-3.module_el8.5.0+2606+4554acc4 | 1.4.6-3.module_el8.5.0+2606+4554acc4 |
| AlmaLinux:8 | pg_repack | before 1.4.6-3.module_el8.6.0+2760+1746ec94 | 1.4.6-3.module_el8.6.0+2760+1746ec94 |
| AlmaLinux:8 | pg_repack | before 1.4.6-3.module_el8.5.0+2607+8c0fd184 | 1.4.6-3.module_el8.5.0+2607+8c0fd184 |
| AlmaLinux:8 | pgaudit | before 1.5.0-1.module_el8.5.0+2607+8c0fd184 | 1.5.0-1.module_el8.5.0+2607+8c0fd184 |
| AlmaLinux:8 | pgaudit | before 1.4.0-5.module_el8.6.0+2758+4f4474df | 1.4.0-5.module_el8.6.0+2758+4f4474df |
| AlmaLinux:8 | pgaudit | before 1.4.0-5.module_el8.5.0+2606+4554acc4 | 1.4.0-5.module_el8.5.0+2606+4554acc4 |
| AlmaLinux:8 | pgaudit | before 1.5.0-1.module_el8.6.0+2760+1746ec94 | 1.5.0-1.module_el8.6.0+2760+1746ec94 |
| AlmaLinux:8 | postgres-decoderbufs | before 0.10.0-2.module_el8.6.0+2758+4f4474df | 0.10.0-2.module_el8.6.0+2758+4f4474df |
| AlmaLinux:8 | postgres-decoderbufs | before 0.10.0-2.module_el8.5.0+2606+4554acc4 | 0.10.0-2.module_el8.5.0+2606+4554acc4 |
| AlmaLinux:8 | postgres-decoderbufs | before 0.10.0-2.module_el8.6.0+2760+1746ec94 | 0.10.0-2.module_el8.6.0+2760+1746ec94 |
| AlmaLinux:8 | postgres-decoderbufs | before 0.10.0-2.module_el8.5.0+2607+8c0fd184 | 0.10.0-2.module_el8.5.0+2607+8c0fd184 |
| AlmaLinux:8 | postgresql | before 12.9-1.module_el8.5.0+2606+4554acc4 | 12.9-1.module_el8.5.0+2606+4554acc4 |
| AlmaLinux:8 | postgresql | before 10.19-1.module_el8.6.0+2744+ce3fc19a | 10.19-1.module_el8.6.0+2744+ce3fc19a |
| AlmaLinux:8 | postgresql | before 13.5-1.module_el8.5.0+2607+8c0fd184 | 13.5-1.module_el8.5.0+2607+8c0fd184 |
| AlmaLinux:8 | postgresql-contrib | before 10.19-1.module_el8.6.0+2744+ce3fc19a | 10.19-1.module_el8.6.0+2744+ce3fc19a |
| AlmaLinux:8 | postgresql-contrib | before 13.5-1.module_el8.5.0+2607+8c0fd184 | 13.5-1.module_el8.5.0+2607+8c0fd184 |
| AlmaLinux:8 | postgresql-contrib | before 12.9-1.module_el8.5.0+2606+4554acc4 | 12.9-1.module_el8.5.0+2606+4554acc4 |
| AlmaLinux:8 | postgresql-docs | before 10.19-1.module_el8.6.0+2744+ce3fc19a | 10.19-1.module_el8.6.0+2744+ce3fc19a |
| AlmaLinux:8 | postgresql-docs | before 12.9-1.module_el8.5.0+2606+4554acc4 | 12.9-1.module_el8.5.0+2606+4554acc4 |
| AlmaLinux:8 | postgresql-docs | before 13.5-1.module_el8.5.0+2607+8c0fd184 | 13.5-1.module_el8.5.0+2607+8c0fd184 |
| AlmaLinux:8 | postgresql-plperl | before 10.19-1.module_el8.6.0+2744+ce3fc19a | 10.19-1.module_el8.6.0+2744+ce3fc19a |
| AlmaLinux:8 | postgresql-plperl | before 12.9-1.module_el8.5.0+2606+4554acc4 | 12.9-1.module_el8.5.0+2606+4554acc4 |
| AlmaLinux:8 | postgresql-plperl | before 13.5-1.module_el8.5.0+2607+8c0fd184 | 13.5-1.module_el8.5.0+2607+8c0fd184 |
+96
Same product
postgresql: all recordsOther highest-scoring records for the same primary product.
- CVE-2017-7546PostgreSQL versions before 9.2.22, 9.3.18, 9.4.13, 9.5.8 and 9.6.4 are vulnerable to incorrect authentication flaw allowing remote…57Plan
- CVE-2019-9193In PostgreSQL 9.3 through 11.2, the "COPY TO/FROM PROGRAM" function allows superusers and users in the 'pg_execute_server_program' group to…55Plan
- CVE-2020-25695A flaw was found in PostgreSQL versions before 13.1, before 12.5, before 11.10, before 10.15, before 9.6.20 and before 9.5.24.49Plan
Published before and after this one in the same product
- ← EarlierCVE-2021-23222Mar 2, 2022 · A man-in-the-middle attacker can inject false responses to the client's first few queries, despite the use of SSL certificate verification…23Monitor
- ← EarlierCVE-2021-3677Mar 2, 2022 · A flaw was found in postgresql.26Monitor
- Later →CVE-2022-2625Aug 18, 2022 · A vulnerability was found in PostgreSQL.33Monitor
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| almalinux:pg_repack | 1.4.6-3.module_el8.5.0+2606+4554acc4 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:pgaudit | 1.4.0-5.module_el8.6.0+2758+4f4474df · AlmaLinux:8 | Package registry (OSV) |
| almalinux:postgres-decoderbufs | 0.10.0-2.module_el8.6.0+2760+1746ec94 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:postgresql | 12.9-1.module_el8.5.0+2606+4554acc4 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:postgresql-contrib | 12.9-1.module_el8.5.0+2606+4554acc4 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:postgresql-docs | 12.9-1.module_el8.5.0+2606+4554acc4 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:postgresql-plperl | 12.9-1.module_el8.5.0+2606+4554acc4 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:postgresql-plpython3 | 12.9-1.module_el8.5.0+2606+4554acc4 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:postgresql-pltcl | 12.9-1.module_el8.5.0+2606+4554acc4 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:postgresql-server | 12.9-1.module_el8.5.0+2606+4554acc4 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:postgresql-server-devel | 12.9-1.module_el8.5.0+2606+4554acc4 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:postgresql-static | 12.9-1.module_el8.5.0+2606+4554acc4 · AlmaLinux:8 | Package registry (OSV) |
| alpine:postgresql | 12.9-r0 · Alpine:v3.11 | Package registry (OSV) |
| alpine:postgresql12 | 12.9-r0 · Alpine:v3.15 | Package registry (OSV) |
| alpine:postgresql13 | 13.5-r0 · Alpine:v3.15 | Package registry (OSV) |
| alpine:postgresql14 | 14.1-r0 · Alpine:v3.15 | Package registry (OSV) |
| alpine:postgresql15 | 14.1-r0 · Alpine:v3.17 | Package registry (OSV) |
| debian:postgresql-11 | 11.14-0+deb10u1 · Debian:10 | Package registry (OSV) |
| debian:postgresql-13 | 13.5-0+deb11u1 · Debian:11 | Package registry (OSV) |
| debian:postgresql-9.6 | 9.6.24-0+deb9u1 · Debian:9 | Package registry (OSV) |
| opensuse:postgresql10 | 10.19-lp152.2.27.1 · openSUSE:Leap 15.2 | Package registry (OSV) |
| opensuse:postgresql11 | 11.14-1.1 · openSUSE:Tumbleweed | Package registry (OSV) |
| opensuse:postgresql12 | 12.9-8.26.1 · openSUSE:Leap 15.3 | Package registry (OSV) |
| opensuse:postgresql13 | 13.5-5.22.1 · openSUSE:Leap 15.3 | Package registry (OSV) |
| opensuse:postgresql14 | 14.1-5.6.1 · openSUSE:Leap 15.3 | Package registry (OSV) |
| opensuse:postgresql15 | 15.4-2.1 · openSUSE:Tumbleweed | Package registry (OSV) |
| opensuse:postgresql16 | 16.4-1.1 · openSUSE:Tumbleweed | Package registry (OSV) |
| opensuse:postgresql17 | 17.6-2.1 · openSUSE:Tumbleweed | Package registry (OSV) |
| red hat:rh-postgresql13-postgresql | 0:13.5-1.el7 · Red Hat:rhel_software_collections:3::el7 | Package registry (OSV) |
| red hat:rh-postgresql13-postgresql-contrib | 0:13.5-1.el7 · Red Hat:rhel_software_collections:3::el7 | Package registry (OSV) |
+20
Exploit status
No known public exploit
No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
No dated events beyond publication.
Patch and commit links
Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.
National notice (Türkiye Cybersecurity Directorate / USOM)
Official security notices citing this record; remediation advice is on the agency's page.
- TR-21-1019 · Dec 23, 2021(RedHat Güvenlik Güncellemesi)
- TR-21-1006 · Dec 17, 2021(RedHat Güvenlik Güncellemesi)
Not on record for this CVE: EPSS history · researcher credit · variant or chain candidate · public bounty program.
Technical details
Attack conditions
- Anyone who can reach it over the internet can trigger it.
- No account or password is required.
- No user action is required.
- Special conditions such as timing or configuration are required.
If successful
- Confidentiality
- high · data can be read
- Integrity
- high · data or configuration can be modified
- Availability
- high · the service can be disrupted
- Attack vector
- Network
- Attack complexity
- High
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality impact
- High
- Integrity impact
- High
- Availability impact
- High
Weakness class (CWE)
CWE-89 · Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
nvd-primary
Root cause
The query text is built by concatenating user input. The database cannot tell where the data ends and the command begins.
The bug in code
The whole CWE-89 classA representative example of this vulnerability class. Not the vendor's source code; it shows the faulty pattern and its fix.
Vulnerable
const owner = req.query.owner;
const rows = await db.query(
"SELECT * FROM files WHERE owner = '" + owner + "'"
);Fixed
const owner = req.query.owner;
const rows = await db.query(
"SELECT * FROM files WHERE owner = $1",
[owner]
);Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
Attack patterns (CAPEC)
- Command Line Execution through SQL InjectionCAPEC-108likelihood: Low · Very High
- Object Relational Mapping InjectionCAPEC-109likelihood: Low · High
- SQL Injection through SOAP Parameter TamperingCAPEC-110likelihood: High · Very High
- Expanding Control over the Operating System from the DatabaseCAPEC-470Very High
- SQL InjectionCAPEC-66likelihood: High · High
- Blind SQL InjectionCAPEC-7likelihood: High · High
ATT&CK techniques
—
Change log (1)
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
Show all references (4 more)Show less
Vendor advisories and official records. Exploit/PoC links are deliberately left out.