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

Saagar Jha, Ron Masas(BREAKPOINT), Hossein Lotfi@@hosselot(Trend Micro Zero Day Initiative), Dillon Franke(Google Project Zero), wac(Trend Micro Zero Day Initiative), Lyutoon(Atredis Partners), YenKoc(Atredis Partners), Dayton Pidhirney(Atredis Partners), Andrew James Gonzalez, Wang Yu(Cyberserval), 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, 秦若涵, 崔志伟, 崔宝江, Deval Jariwala, Guilherme Rambo(Best Buddy Apps), Dalibor Milanovic, Lyutoon, YenKoc, Tony Iskow@@Tybbow, YingQi Shi@@Mas0nShi(DBAppSecurity's WeBin lab), Duy Trần@@khanhduytran0, Joseph Ravichandran@@0xjprx(MIT CSAIL), Thomas Völkl@@vollkorntomate, SEEMOO, TU Darmstadt, Dave G., Kirin@@Pwnrin(Fudan University), LFY@@secsys(Fudan University), an anonymous researcher, Bohdan Stasiuk@@bohdan_stasiuk, Csaba Fitzl@@theevilbit(Kandji), Apple, Google Threat Analysis Group

Affected Software

106 affected componentsFixes available
Expat libexpat
F5 APM Client>=7.2.3<=7.2.5
7.2.6
F5 Traffix SDC=5.2.0
Microsoft cbl2 expat 2.6.4-1
Microsoft azl3 expat 2.6.4-1
alpine/expat<2.7.0-r0
2.7.0-r0
alpine/expat<2.7.0-r0
2.7.0-r0
alpine/expat<2.7.0-r0
2.7.0-r0
alpine/expat<2.7.0-r0
2.7.0-r0
alpine/expat<2.7.0-r0
2.7.0-r0
alpine/expat<2.7.0-r0
2.7.0-r0
alpine/expat<2.7.0-r0
2.7.0-r0
debian/expat<2.5.0-1+deb12u2
2.5.0-1+deb12u2
debian/expat<2.7.0-1
2.7.0-1
debian/expat<2.7.0-1
2.7.0-1
debian/libxmltok*
ubuntu/coin3*
ubuntu/expat*
ubuntu/vnc4*
ubuntu/vtk*
ubuntu/xmlrpc-c*
ubuntu/expat*
ubuntu/ayttm*
ubuntu/cableswig*
ubuntu/cadaver*
ubuntu/coin3*
ubuntu/gdcm*
ubuntu/insighttoolkit4*
ubuntu/libxmltok*
ubuntu/matanza*
ubuntu/smart*
ubuntu/swish-e*
ubuntu/tdom*
ubuntu/vnc4*
ubuntu/vtk*
ubuntu/wbxml2*
ubuntu/xmlrpc-c*
ubuntu/expat*
ubuntu/cadaver*
ubuntu/coin3*
ubuntu/gdcm*
ubuntu/insighttoolkit4*
ubuntu/libxmltok*
ubuntu/matanza*
ubuntu/smart*
ubuntu/swish-e*
ubuntu/tdom*
ubuntu/vnc4*
ubuntu/wbxml2*
ubuntu/xmlrpc-c*
ubuntu/expat*
ubuntu/cadaver*
ubuntu/insighttoolkit4*
ubuntu/libxmltok*
ubuntu/matanza*
ubuntu/swish-e*
ubuntu/tdom*
ubuntu/wbxml2*
ubuntu/xmlrpc-c*
ubuntu/cadaver*
ubuntu/expat<2.4.7-1ubuntu0.6
2.4.7-1ubuntu0.6
ubuntu/insighttoolkit4*
ubuntu/matanza*
ubuntu/tdom*
ubuntu/wbxml2*
ubuntu/libxmltok*
ubuntu/swish-e*
ubuntu/xmlrpc-c*
ubuntu/cadaver*
ubuntu/expat<2.6.1-2ubuntu0.3
2.6.1-2ubuntu0.3
ubuntu/matanza*
ubuntu/tdom*
ubuntu/wbxml2*
ubuntu/libxmltok*
ubuntu/swish-e*
ubuntu/xmlrpc-c*
ubuntu/cadaver*
ubuntu/expat<2.7.1-1
2.7.1-1
ubuntu/matanza*
ubuntu/swish-e*
ubuntu/tdom*
ubuntu/wbxml2*
ubuntu/xmlrpc-c*
ubuntu/cadaver*
ubuntu/matanza*
ubuntu/swish-e*
ubuntu/tdom*
ubuntu/wbxml2*
ubuntu/xmlrpc-c*
ubuntu/cadaver*
ubuntu/matanza*
ubuntu/tdom*
ubuntu/wbxml2*
ubuntu/xmlrpc-c*
ubuntu/swish-e*
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 macOS Ventura<13.7.6
13.7.6
Apple macOS Sonoma<14.7.6
14.7.6
Apple tvOS<18.5
18.5
Apple visionOS<2.5
2.5
Apple WatchOS<11.5
11.5
debian/expat
2.5.0-1+deb12u22.7.0-1
debian/libxmltok<=1.2-4

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 7.2.6
  2. Upgrade

    Upgrade alpine/expat to a version that resolves this vulnerability.

    Fixed in 2.7.0-r0
  3. Upgrade

    Upgrade debian/expat to a version that resolves this vulnerability.

    Fixed in 2.5.0-1+deb12u2
  4. Upgrade

    Upgrade debian/expat to a version that resolves this vulnerability.

    Fixed in 2.7.0-1
  5. Upgrade

    Upgrade ubuntu/expat to a version that resolves this vulnerability.

    Fixed in 2.4.7-1ubuntu0.6
  6. Upgrade

    Upgrade ubuntu/expat to a version that resolves this vulnerability.

    Fixed in 2.6.1-2ubuntu0.3
  7. Upgrade

    Upgrade ubuntu/expat to a version that resolves this vulnerability.

    Fixed in 2.7.1-1
  8. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 17.7.7
  9. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 18.5
  10. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 15.5
  11. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 13.7.6
  12. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 14.7.6
  13. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 2.5
  14. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 11.5
  15. Upgrade

    Upgrade debian/expat to a version that resolves this vulnerability.

    Fixed in 2.5.0-1+deb12u2Fixed in 2.7.0-1
  16. Upgrade

    Upgrade libexpat to a version that resolves this vulnerability.

    Fixed in 2.7.3

Event History

Sep 5, 2024
Data Sourced
via Red Hat·06:52 AM
DescriptionSeverityAffected Software
Mar 14, 2025
CVE Published
via Ubuntu·12:00 AM
Data Sourced
via Ubuntu·12:00 AM
RemedyDescriptionSeverityAffected Software
Updated
via Ubuntu·12:00 AM
Description
CVE Published
via MITRE·08:19 AM
Data Sourced
via MITRE·08:19 AM
DescriptionSeverityWeakness
Data Sourced
via NVD·09:15 AM
DescriptionSeverityWeakness
Exploit Published
via CISA·01:13 PM
Mar 26, 2025
Data Sourced
via Microsoft·07:00 AM
DescriptionSeverityWeakness
Data Sourced
via Microsoft·07:00 AM
Affected Software
Apr 2, 2025
Exploit Published
via GitHub·10:39 AM
May 12, 2025
Data Sourced
via Apple·12:00 AM
DescriptionWeaknessAffected Software
Updated
via Apple·12:00 AM
Affected Software
May 19, 2025
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
Updated
via Ubuntu·12:00 AM
Description
Jul 29, 2025
Updated
via Apple·12:00 AM
Affected Software
Aug 18, 2025
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software
Aug 22, 2025
Updated
via F5·02:28 PM
Affected Software
Nov 3, 2025
Updated
via IBM·12:00 AM
Affected Software
Nov 21, 2025
Updated
via Apple·12:00 AM
Affected Software
Nov 15, 2026
Data Sourced
via OSV·05:30 AM
Affected Software

Parent advisories

This vulnerability appears in the following advisories.

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