---
title: "CVE-2022-40304"
canonical_url: "https://pkgseek.com/security/CVE-2022-40304"
locale: "en"
source: "pkgseek"
entity_type: "cve"
severity: "high"
---

# CVE-2022-40304

An issue was discovered in libxml2 before 2.10.3. Certain invalid XML entity definitions can corrupt a hash table key, potentially leading to subsequent logic errors. In one case, a double-free can be provoked.

CVE-2022-40304 is rated HIGH (7.8), with 22 indexed affected package builds across 4 distributions.

- **Severity / Score**: HIGH (7.8)
- **Affected builds**: 22
- **Affected distros**: 4
- **Distros with fixed_in**: Alibaba Cloud Linux, Oracle Linux, Red Hat Enterprise Linux, Ubuntu

## Affected Packages

| Distribution | Release | Package | Version | Fixed In |
| --- | --- | --- | --- | --- |
| Alibaba Cloud Linux | 3 | libxml2 | 2.9.7-13.0.1.al8.1 | 2.9.7-15.0.1.al8.1 |
| Alibaba Cloud Linux | 3 | libxml2-devel | 2.9.7-13.0.1.al8.1 | 2.9.7-15.0.1.al8.1 |
| Alibaba Cloud Linux | 3 | python3-libxml2 | 2.9.7-13.0.1.al8.1 | 2.9.7-15.0.1.al8.1 |
| Oracle Linux | 8 | libxml2 | 2.9.7-15.el8 | 2.9.7-15.el8_7.1 |
| Oracle Linux | 8 | libxml2-devel | 2.9.7-15.el8 | 2.9.7-15.el8_7.1 |
| Oracle Linux | 8 | python3-libxml2 | 2.9.7-15.el8 | 2.9.7-15.el8_7.1 |
| Oracle Linux | 9 | libxml2 | 2.9.13-2.el9 | 2.9.13-3.el9_1 |
| Oracle Linux | 9 | libxml2-devel | 2.9.13-2.el9 | 2.9.13-3.el9_1 |
| Oracle Linux | 9 | python3-libxml2 | 2.9.13-2.el9 | 2.9.13-3.el9_1 |
| Red Hat Enterprise Linux | 9.8 | libxml2 | 2.9.13-1.el9_0.1 | 2.9.13-3.el9_1 |
| Red Hat Enterprise Linux | 9.8 | libxml2-devel | 2.9.13-1.el9_0.1 | 2.9.13-3.el9_1 |
| Red Hat Enterprise Linux | 9.8 | python3-libxml2 | 2.9.13-1.el9_0.1 | 2.9.13-3.el9_1 |
| Ubuntu | focal | libxml2 | 2.9.10+dfsg-5 | 2.9.10+dfsg-5ubuntu0.20.04.5 |
| Ubuntu | focal | libxml2-dev | 2.9.10+dfsg-5 | 2.9.10+dfsg-5ubuntu0.20.04.5 |
| Ubuntu | focal | libxml2-doc | 2.9.10+dfsg-5 | 2.9.10+dfsg-5ubuntu0.20.04.5 |
| Ubuntu | focal | libxml2-utils | 2.9.10+dfsg-5 | 2.9.10+dfsg-5ubuntu0.20.04.5 |
| Ubuntu | focal | python3-libxml2 | 2.9.10+dfsg-5 | 2.9.10+dfsg-5ubuntu0.20.04.5 |
| Ubuntu | focal | python3-libxml2-dbg | 2.9.10+dfsg-5 | 2.9.10+dfsg-5ubuntu0.20.04.5 |
| Ubuntu | jammy | libxml2 | 2.9.13+dfsg-1build1 | 2.9.13+dfsg-1ubuntu0.2 |
| Ubuntu | jammy | libxml2-dev | 2.9.13+dfsg-1build1 | 2.9.13+dfsg-1ubuntu0.2 |
| Ubuntu | jammy | libxml2-doc | 2.9.13+dfsg-1build1 | 2.9.13+dfsg-1ubuntu0.2 |
| Ubuntu | jammy | libxml2-utils | 2.9.13+dfsg-1build1 | 2.9.13+dfsg-1ubuntu0.2 |
