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
root.io logo minimus.io logo echo.ai logo

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

NameVendorStart VersionEnd Version
Libxml2Xmlsoft*2.10.3 (excluding)
Red Hat Enterprise Linux 8RedHatlibxml2-0:2.9.7-15.el8_7.1*
Red Hat Enterprise Linux 8RedHatlibxml2-0:2.9.7-15.el8_7.1*
Red Hat Enterprise Linux 8.6 Extended Update SupportRedHatlibxml2-0:2.9.7-13.el8_6.4*
Red Hat Enterprise Linux 9RedHatlibxml2-0:2.9.13-3.el9_1*
Red Hat Enterprise Linux 9RedHatlibxml2-0:2.9.13-3.el9_1*
Text-Only JBCSRedHatlibxml2*
Libxml2Ubuntubionic*
Libxml2Ubuntuesm-infra-legacy/trusty*
Libxml2Ubuntuesm-infra/bionic*
Libxml2Ubuntuesm-infra/focal*
Libxml2Ubuntuesm-infra/xenial*
Libxml2Ubuntufocal*
Libxml2Ubuntujammy*
Libxml2Ubuntukinetic*
Libxml2Ubuntutrusty*
Libxml2Ubuntutrusty/esm*
Libxml2Ubuntuupstream*
Libxml2Ubuntuxenial*

Potential Mitigations

References