# CVE-2013-0340: Python 3.8 and 3 others: expat before version 2.4.0 does not properly handle entities expansion unless an application developer…

CVE-2013-0340 is fixed in 3 products on 2 platforms, first by Python 3.9 3.9.7, released August 30, 2021. 3 other affected products have no fix yet. It is not reported as exploited. Patch Radar priority: Routine.

- Web page: https://patchblox.com/security/cve/CVE-2013-0340
- Priority: Routine
- CVSS: 6.8 (Important)
- EPSS: 0.1943
- CISA KEV: not listed
- Exploited (vendor report): no
- Publicly disclosed: no
- Published: Jan 21, 2014
- Vendor advisory: https://nvd.nist.gov/vuln/detail/CVE-2013-0340

## 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.

## Where it's fixed

| Platform | Product | Fixed in | Fix | Released |
|---|---|---|---|---|
| Windows apps | Python 3.9 | 3.9.7 | [Python 3.9 3.9.7](https://patchblox.com/security/data/fix/windows-app/python.python.3.9-3.9.7.md) | Aug 30, 2021 |
| Linux | expat RHEL 8 | 0:2.5.0-1.el8_10 | [RHSA-2025:21776](https://patchblox.com/security/data/fix/linux/rhsa-2025-21776.md) | Nov 19, 2025 |
| Linux | expat RHEL 9 | 0:2.4.9-1.el9_1 | [RHBA-2022:8290](https://patchblox.com/security/data/fix/linux/rhba-2022-8290.md) | Nov 15, 2022 |
| Linux | expat almalinux 8 | 2.5.0-1.el8_10 | [ALSA-2025:21776](https://patchblox.com/security/data/fix/linux/alsa-2025-21776.md) | Nov 19, 2025 |
| Linux | expat-devel RHEL 8 | 0:2.5.0-1.el8_10 | [RHSA-2025:21776](https://patchblox.com/security/data/fix/linux/rhsa-2025-21776.md) | Nov 19, 2025 |
| Linux | expat-devel RHEL 9 | 0:2.4.9-1.el9_1 | [RHBA-2022:8290](https://patchblox.com/security/data/fix/linux/rhba-2022-8290.md) | Nov 15, 2022 |
| Linux | expat-devel almalinux 8 | 2.5.0-1.el8_10 | [ALSA-2025:21776](https://patchblox.com/security/data/fix/linux/alsa-2025-21776.md) | Nov 19, 2025 |

## No fix yet

| Platform | Product | Status |
|---|---|---|
| Windows apps | Python 3.6 | no-fix |
| Windows apps | Python 3.7 | no-fix |
| Windows apps | Python 3.8 | no-fix |

---

Data as of 2026-11-07T18:46:35Z UTC. Source: Patchblox Patch Radar (https://patchblox.com/security/patch-radar). Patchblox finds out-of-date software on Windows, macOS and Linux and updates it through release rings: https://patchblox.com/demo

Free to use with attribution: show "Data: Patchblox Patch Radar" with a link to https://patchblox.com/security/patch-radar. Terms, including what needs a written agreement: https://patchblox.com/security/patch-radar/use-the-data

Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.
