CVE Vulnerabilities

CVE-2022-40304

Double Free

Published: Nov 23, 2022 | Modified: Apr 28, 2025
CVSS 3.x
7.8
HIGH
Source:
NVD
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
CVSS 2.x
RedHat/V2
RedHat/V3
7.8 MODERATE
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Ubuntu
MEDIUM

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.

Weakness

The product calls free() twice on the same memory address.

Affected Software

Name Vendor Start Version End Version
Libxml2 Xmlsoft * 2.10.3 (excluding)
Red Hat Enterprise Linux 8 RedHat libxml2-0:2.9.7-15.el8_7.1 *
Red Hat Enterprise Linux 8 RedHat libxml2-0:2.9.7-15.el8_7.1 *
Red Hat Enterprise Linux 8.6 Extended Update Support RedHat libxml2-0:2.9.7-13.el8_6.4 *
Red Hat Enterprise Linux 9 RedHat libxml2-0:2.9.13-3.el9_1 *
Red Hat Enterprise Linux 9 RedHat libxml2-0:2.9.13-3.el9_1 *
Text-Only JBCS RedHat libxml2 *
Libxml2 Ubuntu bionic *
Libxml2 Ubuntu esm-infra-legacy/trusty *
Libxml2 Ubuntu esm-infra/bionic *
Libxml2 Ubuntu esm-infra/focal *
Libxml2 Ubuntu esm-infra/xenial *
Libxml2 Ubuntu focal *
Libxml2 Ubuntu jammy *
Libxml2 Ubuntu kinetic *
Libxml2 Ubuntu trusty *
Libxml2 Ubuntu trusty/esm *
Libxml2 Ubuntu upstream *
Libxml2 Ubuntu xenial *

Potential Mitigations

References