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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 6.8
- **CVSS:** 6.8 (v2.0, NVD) `AV:N/AC:M/Au:N/C:P/I:P/A:P`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Medium; Authentication: None; Confidentiality impact: Partial; Integrity impact: Partial; Availability impact: Partial
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** Yes (see exploit references)
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 19.43% (percentile 98, 2026-11-26)
- **CWE:** CWE-611
- **Published:** 2014-01-21T18:00:00.000Z
- **Modified:** 2026-10-14T07:16:35.810Z

## Who should check

- Anyone running libexpat \< 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.

## Affected and fixed versions

- libexpat: \< 2.4.0 (cvelist)

## Mitigation

- Upgrade libexpat to 2.4.0 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2013-0340. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2013-0340.md
Affected: libexpat < 2.4.0
Fixed in: libexpat 2.4.0

Steps:
1. Search this machine and project for libexpat: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2013-0340 being exploited?

There is no confirmed exploitation: CVE-2013-0340 is not in the CISA Known Exploited Vulnerabilities catalog. Public exploit code or a proof of concept is available. EPSS estimates a 19.43% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2013-0340?

Medium: CVSS 6.8 (v2.0, scored by NVD). Remote, no login needed.

### Which versions are affected by CVE-2013-0340?

libexpat \< 2.4.0.

### Is there a fix for CVE-2013-0340?

Yes. Fixed in libexpat 2.4.0. Upgrade libexpat to 2.4.0 or later.

### How do I check if I'm affected by CVE-2013-0340?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

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

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2013-0340>

HTML: <https://flawdb.com/CVE-2013-0340> · JSON: <https://flawdb.com/api/v1/entries/CVE-2013-0340>
