Skip to main content
VulnerabilityPublished Updated

CVE-2022-25313: Expat · Uncontrolled Recursion

Source CVE Database V5

0

Not known to be exploited · CVSS 6.5 Medium : upgrade to 2.4.5 when convenient.

Data as of 26 Oct 2026, 16:39 UTC

CVSS 3.1 base score
6.5Medium
How severe the flaw is on the 0–10 CVSS scale.
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:H

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 18 Feb 2022

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponised: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq 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

ProductAffectedFixed in
GitHublibexpat/libexpatpkg:github/libexpat/libexpatOther threatsAffected
  • <2.4.5
Fixed in
  • 2.4.5

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

Community reviews

Loading reviews…