---
id: CVE-2022-25313
title: >-
  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.
summary: >-
  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.
severity: medium
cvss: 6.5
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H'
cwe:
  - CWE-674
  - CWE-674
vendor: libexpat_project
product: libexpat
affected:
  - libexpat < 2.4.5
  - debian_linux = 10.0
  - debian_linux = 11.0
  - fedora = 34
  - fedora = 35
  - http_server = 12.2.1.3.0
  - http_server = 12.2.1.4.0
  - zfs_storage_appliance_kit = 8.8
  - sinema_remote_connect_server < 3.1
patched:
  - libexpat 2.4.5
  - sinema_remote_connect_server 3.1
published: '2022-02-18'
updated: '2026-10-14'
sourceUpdated: '2026-10-14T17:17:34.427'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2022-25313'
references:
  - url: 'http://www.openwall.com/lists/oss-security/2022/02/19/1'
    label: cve@mitre.org
  - url: 'https://cert-portal.siemens.com/productcert/pdf/ssa-484086.pdf'
    label: cve@mitre.org
  - url: 'https://github.com/libexpat/libexpat/pull/558'
    label: cve@mitre.org
  - url: 'https://lists.debian.org/debian-lts-announce/2022/03/msg00007.html'
    label: cve@mitre.org
  - url: >-
      https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3UFRBA3UQVIQKXTBUQXDWQOVWNBKLERU/
    label: cve@mitre.org
  - url: >-
      https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/Y27XO3JMKAOMQZVPS3B4MJGEAHCZF5OM/
    label: cve@mitre.org
  - url: 'https://security.gentoo.org/glsa/202209-24'
    label: cve@mitre.org
  - url: 'https://security.netapp.com/advisory/ntap-20220303-0008/'
    label: cve@mitre.org
  - url: 'https://www.debian.org/security/2022/dsa-5085'
    label: cve@mitre.org
  - url: 'https://www.oracle.com/security-alerts/cpuapr2022.html'
    label: cve@mitre.org
  - url: 'http://www.openwall.com/lists/oss-security/2022/02/19/1'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://cert-portal.siemens.com/productcert/pdf/ssa-484086.pdf'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://github.com/libexpat/libexpat/pull/558'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://lists.debian.org/debian-lts-announce/2022/03/msg00007.html'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: >-
      https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3UFRBA3UQVIQKXTBUQXDWQOVWNBKLERU/
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: >-
      https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/Y27XO3JMKAOMQZVPS3B4MJGEAHCZF5OM/
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://security.gentoo.org/glsa/202209-24'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://security.netapp.com/advisory/ntap-20220303-0008/'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://www.debian.org/security/2022/dsa-5085'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://www.oracle.com/security-alerts/cpuapr2022.html'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://cert-portal.siemens.com/productcert/html/ssa-398330.html'
    label: 0b142b55-0307-4c5a-b3c9-f314f3fb7c5e
  - url: 'https://cert-portal.siemens.com/productcert/html/ssa-484086.html'
    label: 0b142b55-0307-4c5a-b3c9-f314f3fb7c5e
tags:
  - nvd
  - exploit-available
epss: 0.03295
epssPercentile: 0.88292
exploits:
  github: 2
  githubRepos:
    - 'https://github.com/ShaikUsaf/external_expact_AOSP10_r33_CVE-2022-25313'
    - 'https://github.com/Trinadh465/external_expat-2.1.0_CVE-2022-25313'
  checkedAt: '2026-10-14T17:45:28.515Z'
exploitAvailable: true
ingestedAt: '2026-10-14T17:44:53.593Z'
---

## Overview

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.

## Affected

- `libexpat < 2.4.5`
- `debian_linux = 10.0`
- `debian_linux = 11.0`
- `fedora = 34`
- `fedora = 35`
- `http_server = 12.2.1.3.0`
- `http_server = 12.2.1.4.0`
- `zfs_storage_appliance_kit = 8.8`
- `sinema_remote_connect_server < 3.1`

## Remediation

Upgrade past the affected range:

- `libexpat 2.4.5`
- `sinema_remote_connect_server 3.1`
