CVE-2022-31621 in Mariadb
MariaDB Server before 10.7 is vulnerable to Denial of Service. In extra/mariabackup/ds_xbstream.cc, when an error occurs (stream_ctxt->dest_file == NULL) while executing the method xbstream_open, the held lock is not released correctly, which allows local users to trigger a denial of service due to the deadlock. Not...
Affects 1 product from 1 vendor. Facts below cite their sources.
Requires local access, low complexity, low privileges required, no user interaction needed, impact contained to the vulnerable component, no confidentiality impact, no integrity impact, full availability impact.
Affected products and versions
| Vendor | Product | Affected versions |
|---|---|---|
| Mariadb | Mariadb | < 10.2.41 ≥ 10.3.0, < 10.3.32 ≥ 10.4.0, < 10.4.22 ≥ 10.5.0, < 10.5.13 ≥ 10.6.0, < 10.6.5 |
A product listed here is affected only at the versions shown. Use the free check to test the exact version you run.
Fix and vendor advisory
No official vendor advisory link on record. See the CVE record.
Exploitation
| CISA known-exploited | Not in the CISA KEV catalog |
|---|---|
| Public exploit | Not confirmed |
Official description
MariaDB Server before 10.7 is vulnerable to Denial of Service. In extra/mariabackup/ds_xbstream.cc, when an error occurs (stream_ctxt->dest_file == NULL) while executing the method xbstream_open, the held lock is not released correctly, which allows local users to trigger a denial of service due to the deadlock. Note: The vendor argues this is just an improper locking bug and not a vulnerability with adverse effects.
Source: NIST NVD / MITRE CVE.
Record details
| CVE ID | CVE-2022-31621 |
|---|---|
| BreachSpider ID | BS-2022-GLOBAL-068366-M |
| CVSS vector | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
| Published | 2022-05-25 |
| Last modified | 2026-06-17 |
| Weakness (CWE) | |
| Source | NVD |
Weakness definitions
CWE-667: CWE-667
Related attack patterns (CAPEC)
CAPEC-27 Leveraging Race Conditions via Symbolic Links via CWE-667
CAPEC-25 Forced Deadlock via CWE-667
CAPEC-26 Leveraging Race Conditions via CWE-667
Mapping is CWE to CAPEC per MITRE CAPEC 3.9.
Analysis AI-written, not human-reviewed
MariaDB Server versions before 10.7 are vulnerable to a Denial of Service (DoS) due to improper handling of locks in the xbstream_open method in ds_xbstream.cc, which can lead to a deadlock when an error occurs.
The vulnerability arises when an error occurs in the xbstream_open method, specifically when stream_ctxt->dest_file is NULL. This condition can lead to a deadlock as the lock is not released correctly, allowing local users to trigger a DoS.
Questions
What is CVE-2022-31621?
MariaDB Server versions before 10.7 are vulnerable to a Denial of Service (DoS) due to improper handling of locks in the xbstream_open method in ds_xbstream.cc, which can lead to a deadlock when an error occurs.
What is the CVSS score for CVE-2022-31621?
CVE-2022-31621 has CVSS 5.5 (Medium). Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H. EPSS: 0.3%.
Is CVE-2022-31621 actively exploited?
No confirmed active exploitation of CVE-2022-31621 as of 2026-09-25.
How do I remediate CVE-2022-31621?
Priority: MEDIUM.
What systems are affected by CVE-2022-31621?
CVE-2022-31621 affects Mariadb Mariadb.
For developers and AI agents
Run this check from your own code or agent
REST API
curl -s https://breachspider.com/api/v1/assets/correlate-cves \
-H "Authorization: Bearer $BREACHSPIDER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"assets":[{"asset_id":"dev-1","vendor":"Mariadb","product":"Mariadb","version":"1.0"}]}'
MCP for AI agents
# hosted: add as a connector
https://mcp.breachspider.com/mcp
# local
pipx install breachspider-mcp
Free trial: 14 days, 750 device checks, no card.
Page facts from NVD, MITRE, CISA and vendor advisories, record last modified 2026-06-17.