CVE-2024-8176: Libexpat: expat: improper restriction of xml entity expansion depth in libexpat

Published Sep 5, 2024
·
Updated

A stack overflow vulnerability exists in the libexpat library due to the way it handles recursive entity expansion in XML documents. When parsing an XML document with deeply nested entity references, libexpat can be forced to recurse indefinitely, exhausting the stack space and causing a crash. This issue could lead to denial of service (DoS) or, in some cases, exploitable memory corruption, depending on the environment and library usage.

Other sources

afpfs. The issue was addressed with improved memory handling.

Apple

afpfs. This issue was addressed with improved checks.

Apple

AirDrop. A permissions issue was addressed with additional restrictions.

Apple

Apple Intelligence Reports. A permissions issue was addressed with additional restrictions.

Apple

AppleJPEG. The issue was addressed with improved input sanitization.

Apple

Credit

Hossein Lotfi@@hosselot(Trend Micro Zero Day Initiative), Csaba Fitzl@@theevilbit(Kandji), an anonymous researcher, Dayton Pidhirney(Atredis Partners), Lyutoon, YenKoc, Mateusz Krzywicki@@krzywix, Michael DePlante@@izobashi(Trend Micro Zero Day Initiative), Lucas Leong@@_wmliang_(Trend Micro Zero Day Initiative), Christian Kohlschütter, CVE-2024-8176, Paweł Płatek (Trail(Bits), LFY@@secsys(Fudan University), wac, Dave G., Kirin@@Pwnrin, 7feilee, Eric Dorphy(Twin Cities App Dev LLC), Adam M., CVE-2025-26465, CVE-2025-26466, Lyutoon(Atredis Partners), YenKoc(Atredis Partners), Joseph Ravichandran@@0xjprx(MIT CSAIL), Dillon Franke(Google Project Zero), wac(Trend Micro Zero Day Initiative), Guilherme Rambo(Best Buddy Apps), Apple, Google Threat Analysis Group, Saagar Jha, Tony Iskow@@Tybbow, Google V8 Security Team, Andreas Jaegersberger & Ro Achterberg(Nosebeard Labs), rheza@@ginggilBesel(Palo Alto Networks), Edouard Bochin@@le_douds(Palo Alto Networks), Tao Yan@@Ga1ois(Palo Alto Networks), Nan Wang@@eternalsakura13, Ignacio Sanmillan@@ulexec, Jiming Wang, Jikai Ren, Yuhao Hu, Yan Kang, Chenggang Wu, Xiaojie Wei, Ivan Fratric(Google Project Zero), Juergen Schmied(Lynck GmbH), jioundai(360 Vulnerability Research Institute), chen fengjiao(HBC), Ron Masas(BREAKPOINT), Wang Yu(Cyberserval), Andrew James Gonzalez, Richard Hyunho Im@@richeeta, Andr.Ess, Noah Gregory (wts.dev), Thibaud Kehler, 秦若涵, 崔志伟, 崔宝江, Deval Jariwala, Dalibor Milanovic, YingQi Shi@@Mas0nShi(DBAppSecurity's WeBin lab), Duy Trần@@khanhduytran0, Shehab Khan, CertiK@@CertiK, Thomas Völkl@@vollkorntomate, SEEMOO, TU Darmstadt, Kirin@@Pwnrin(Fudan University), Bohdan Stasiuk@@bohdan_stasiuk, Sourabhkumar Mishra, @@RenwaX23, Ryan Dowd@@_rdowd

Affected Software

16 affected componentsFixes available
Apple macOS Ventura<13.7.6
13.7.6
Apple macOS Sonoma<14.7.6
14.7.6
Expat libexpat
F5 APM Client>=7.2.3<=7.2.5
7.2.6
F5 Traffix SDC=5.2.0
Apple WatchOS<11.5
11.5
Apple iPadOS<17.7.7
17.7.7
Apple iOS<18.5
18.5
Apple iPadOS<18.5
18.5
Apple macOS Sequoia<15.5
15.5
Apple visionOS<2.5
2.5
Apple tvOS<18.5
18.5
Microsoft azl3 expat 2.6.4-1
Microsoft cbl2 expat 2.6.4-1
debian/expat<=2.2.10-2+deb11u5, <=2.2.10-2+deb11u7, <=2.5.0-1+deb12u1
2.5.0-1+deb12u22.7.1-22.7.5-12.8.0-1
debian/libxmltok<=1.2-4

Event History

Sep 5, 2024
Data Sourced
via Red Hat·06:52 AM
DescriptionSeverityAffected Software
Mar 14, 2025
CVE Published
via MITRE·08:19 AM
Data Sourced
via MITRE·08:19 AM
DescriptionSeverityWeakness
Data Sourced
via NVD·09:15 AM
DescriptionSeverityWeakness
Mar 26, 2025
Data Sourced
via Microsoft·07:00 AM
DescriptionSeverityWeakness
Data Sourced
via Microsoft·07:00 AM
Affected Software
Updated
via Microsoft·07:00 AM
DescriptionSeverity
May 12, 2025
Data Sourced
via Apple·12:00 AM
DescriptionWeaknessAffected Software
Updated
via Apple·12:00 AM
DescriptionWeaknessAffected Software
Updated
via Apple·12:00 AM
Affected Software
Jun 16, 2025
Advisory Published
via F5·12:58 AM
Data Sourced
via F5·12:58 AM
DescriptionSeverityWeaknessAffected Software
Jul 11, 2025
Data Sourced
via Ubuntu·05:54 PM
RemedyDescriptionSeverityAffected Software
Nov 3, 2025
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software
Mar 21, 2026
Data Sourced
via Launchpad·03:23 AM
Description
Apr 26, 2026
Data Sourced
via Debian·03:43 AM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2024-8176?

CVE-2024-8176 is classified as a high-severity vulnerability due to its potential to lead to a denial of service through stack overflow.

2

What software is affected by CVE-2024-8176?

CVE-2024-8176 affects the Expat libexpat library, particularly in its handling of XML documents.

3

How can I mitigate the risks associated with CVE-2024-8176?

To mitigate CVE-2024-8176, it is recommended to update to the latest version of libexpat, which addresses this vulnerability.

4

How does CVE-2024-8176 affect XML parsing?

CVE-2024-8176 allows malicious XML documents with deeply nested entity references to cause endless recursion, leading to stack exhaustion during parsing.

5

What is the cause of the vulnerability identified in CVE-2024-8176?

The vulnerability in CVE-2024-8176 is caused by improper handling of recursive entity expansion in the libexpat library.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203