CVE-2022-25313: Expat · Uncontrolled Recursion
Source CVE Database V5
Not known to be exploited · CVSS 6.5 Medium : upgrade to 2.4.5 when convenient.
Data as of 26 Oct 2026, 14:05 UTC
- EPSS
- 3.2% chance of exploitation in 30 days – higher than 88% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 2.4.5
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:HExploitation evidence
Disclosed: evidence found.
CVE published 18 Feb 2022
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.
What to do
Upgrade libexpat/libexpat to 2.4.5.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
GitHublibexpat/libexpatpkg:github/libexpat/libexpatOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
European organizations should take the following specific mitigation steps: 1) Inventory and identify all software and systems that use libexpat for XML parsing, including embedded devices and third-party applications. 2) Upgrade libexpat to version 2.4.5 or later, where the vulnerability is fixed. If direct upgrades are not feasible, apply vendor patches or updates that include the fixed libexpat version. 3) Implement input validation and XML parsing restrictions, such as disabling DTD processing or limiting the maximum allowed nesting depth of XML elements, to prevent exploitation via maliciously crafted XML. 4) Employ application-layer firewalls or XML gateways that can detect and block suspicious XML payloads with excessive nesting or large DTDs. 5) Monitor application logs and network traffic for unusual XML processing errors or crashes that may indicate attempted exploitation. 6) Educate users and administrators about the risks of processing untrusted XML files and the importance of applying security updates promptly. 7) For critical systems, consider sandboxing XML parsing operations to contain potential DoS effects. These targeted measures go beyond generic patching advice by focusing on detection, prevention, and operational controls tailored to the nature of this vulnerability.
Description
In Expat (aka libexpat) before 2.4.5, an attacker can trigger stack exhaustion in build_model via a large nesting depth in the DTD element.
References
- github.com/libexpat/libexpat/pull/558 (opens in a new tab)
- openwall.com/lists/oss-security/2022/02/19/1 (opens in a new tab)
- debian.org/security/2022/dsa-5085 (opens in a new tab)
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3UFRBA3UQVIQKXTBUQXDWQOVWNBKLERU/ (opens in a new tab)
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/Y27XO3JMKAOMQZVPS3B4MJGEAHCZF5OM/ (opens in a new tab)
- lists.debian.org/debian-lts-announce/2022/03/msg00007.html (opens in a new tab)
- oracle.com/security-alerts/cpuapr2022.html (opens in a new tab)
- security.netapp.com/advisory/ntap-20220303-0008/ (opens in a new tab)
- cert-portal.siemens.com/productcert/pdf/ssa-484086.pdf (opens in a new tab)
- security.gentoo.org/glsa/202209-24 (opens in a new tab)