CVE-2022-25313
Bottlerocket vulnerability analysis and mitigation

Overview

In Expat (aka libexpat) before version 2.4.5, an attacker can trigger stack exhaustion in build_model function via a large nesting depth in the DTD element. The vulnerability was discovered and disclosed in February 2022, affecting the XML parsing C library Expat which is widely used across many software applications (MITRE, NVD).

Technical details

The vulnerability occurs because buildnode is a recursively called function within buildmodel. When processing XML files with deeply nested DTD elements, this recursive approach can lead to stack exhaustion. The issue was fixed by adjusting the code to run iteratively instead of recursively, using already allocated heap space as temporary stack growing from top to bottom. The fix maintains full API and ABI compatibility without adding new fields to data structures (GITHUB).

Impact

The vulnerability has a CVSS v3.1 base score of 6.5 (Medium), with attack vector being Network, attack complexity Low, requiring no privileges but user interaction, and affecting only availability. A successful exploitation could result in denial of service or potentially arbitrary code execution when processing malformed XML files (NETAPP).

Mitigation and workarounds

The vulnerability was fixed in Expat version 2.4.5. Users and organizations are strongly recommended to upgrade to this version or later. The fix involves changing the recursive implementation to an iterative one while maintaining compatibility. Multiple Linux distributions and software vendors have released patches for their affected products (DEBIAN, FEDORA).

Additional resources


SourceThis report was generated using AI

Related Bottlerocket vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2024-45492CRITICAL9.8
  • BottlerocketBottlerocket
  • expat-docs
NoYesAug 30, 2024
CVE-2024-45491CRITICAL9.8
  • BottlerocketBottlerocket
  • thunderbird
NoYesAug 30, 2024
CVE-2022-21505MEDIUM6.7
  • NixOSNixOS
  • linux-azure-fde-5.15
NoYesDec 24, 2024
CVE-2022-28693MEDIUM4.7
  • Linux KernelLinux Kernel
  • VMware_bootbank_bmcal
NoYesFeb 14, 2025
CVE-2024-45310LOW3.6
  • cAdvisorcAdvisor
  • k3s
NoYesSep 03, 2024

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management