cve.bz

CVE-2022-40304 Double Free

7.8 highEPSS 5.8%Fix available

High (7.8). EPSS 5.8% estimated probability of exploitation activity in the next 30 days.

On this page
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.

Severity

CVSS 3.1

7.8 high
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
EPSS
5.8% (unchanged from 5.8% a week ago; 5.8% 30 days ago) estimated probability of exploitation activity in the next 30 days; 93rd percentile. Scored 2026-11-15. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: partial, assessed 2025-04-28. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-415 Double Free
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2022-40304 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2022-40304?via=ask-ai-copy and https://cve.bz/cve/CVE-2022-40304?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2022-40304 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Badge for a README or a site

CVE-2022-40304

An image that stays current: it is drawn from the data each time it is fetched (a host that proxies images, as GitHub does, may show its copy for a while). Markdown:

[![CVE-2022-40304](https://cve.bz/cve/badge/CVE-2022-40304.svg)](https://cve.bz/cve/CVE-2022-40304)

HTML:

<a href="https://cve.bz/cve/CVE-2022-40304"><img src="https://cve.bz/cve/badge/CVE-2022-40304.svg" alt="CVE-2022-40304"></a>

Affected

Versions

From the NVD's CPE matches.

ProductAffected
xmlsoft:libxml2before 2.10.3
apple:ipadosbefore 15.7.2
apple:iphone_osbefore 15.7.2
apple:macosfrom 11.0 before 11.7.2
apple:macosfrom 12.0 before 12.6.2
apple:tvosbefore 16.2
apple:watchosbefore 9.2

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian10libxml22.9.4+dfsg1-7+deb10u5DLA-3172-1
Debian11libxml22.9.10+dfsg-6.7+deb11u3DSA-5271-1
Debian12, 13, 14libxml22.9.14+dfsg-1.1DEBIAN-CVE-2022-40304
Ubuntu18.04:LTSlibxml22.9.4+dfsg1-6.1ubuntu1.8UBUNTU-CVE-2022-40304 USN-5760-1
Ubuntu20.04:LTSlibxml22.9.10+dfsg-5ubuntu0.20.04.5UBUNTU-CVE-2022-40304 USN-5760-1
Ubuntu22.04:LTSlibxml22.9.13+dfsg-1ubuntu0.2UBUNTU-CVE-2022-40304 USN-5760-1
UbuntuPro:14.04:LTSlibxml22.9.1+dfsg1-3ubuntu4.13+esm4UBUNTU-CVE-2022-40304 USN-5760-2
UbuntuPro:16.04:LTSlibxml22.9.3+dfsg1-1ubuntu0.7+esm4UBUNTU-CVE-2022-40304 USN-5760-2
Red Hatenterprise_linux:8::appstreamlibxml2-devel, libxml2-debuginfo, libxml2-debugsource and 1 more0:2.9.7-15.el8_7.1RHSA-2023:0173
Red Hatenterprise_linux:8::baseoslibxml2, python3-libxml2, libxml2-debuginfo and 2 more0:2.9.7-15.el8_7.1RHSA-2023:0173
Red Hatenterprise_linux:9::appstreamlibxml2-devel, libxml2-debuginfo, libxml2-debugsource and 1 more0:2.9.13-3.el9_1RHSA-2023:0338
Red Hatenterprise_linux:9::baseoslibxml2, python3-libxml2, libxml2-debuginfo and 2 more0:2.9.13-3.el9_1RHSA-2023:0338
Red Hatrhel_eus:8.6::appstreamlibxml2-devel, libxml2-debuginfo, libxml2-debugsource and 1 more0:2.9.7-13.el8_6.4RHSA-2024:0413
Red Hatrhel_eus:8.6::baseoslibxml2, python3-libxml2, libxml2-debuginfo and 2 more0:2.9.7-13.el8_6.4RHSA-2024:0413
SUSEEnterprise Storage 6, Enterprise Storage 7, Linux Enterprise High Performance Computing 15 SP1-ESPOS and 18 morelibxml2, python-libxml2-python2.9.7-150000.3.51.1SUSE-SU-2022:3871-1
SUSELinux Enterprise Micro 5.1libxml22.9.7-150000.3.51.1SUSE-SU-2022:3871-1
SUSELinux Enterprise Micro 5.3, Linux Enterprise Module for Basesystem 15 SP4libxml2, libxml2-python2.9.14-150400.5.10.1SUSE-SU-2022:3692-1
SUSELinux Enterprise Module for Python 2 15 SP3python-libxml2-python2.9.7-150000.3.51.1SUSE-SU-2022:3871-1
SUSELinux Enterprise Server 12 SP2-BCL, Linux Enterprise Server 12 SP3-BCL, Linux Enterprise Server 12 SP4-LTSS and 6 morelibxml22.9.4-46.59.2SUSE-SU-2022:3717-1
SUSELinux Enterprise Server 12 SP2-BCL, Linux Enterprise Server 12 SP3-BCL, Linux Enterprise Server 12 SP4-LTSS and 5 morepython-libxml22.9.4-46.59.3SUSE-SU-2022:3717-1
openSUSELeap 15.3, Leap Micro 5.2libxml2, python-libxml2-python2.9.7-150000.3.51.1SUSE-SU-2022:3871-1
openSUSELeap 15.4libxml2, libxml2-python2.9.14-150400.5.10.1SUSE-SU-2022:3692-1
openSUSELeap 15.4python-libxml2-python2.9.7-150000.3.51.1SUSE-SU-2022:3871-1
openSUSETumbleweedlibxml22.10.3-1.1openSUSE-SU-2024:12419-1
AlmaLinux8libxml2, libxml2-devel, python3-libxml22.9.7-15.el8_7.1ALSA-2023:0173
AlmaLinux9libxml2, libxml2-devel, python3-libxml22.9.13-3.el9_1ALSA-2023:0338
Rocky Linux8libxml20:2.9.7-15.el8_7.1RLSA-2023:0173
Rocky Linux9libxml20:2.9.13-3.el9_1RLSA-2023:0338
Alpinev3.13, v3.14, v3.15 and 1 morelibxml22.9.14-r2ALPINE-CVE-2022-40304
Alpinev3.17, v3.18, v3.19 and 5 morelibxml22.10.3-r0ALPINE-CVE-2022-40304
Azure Linux2libxml22.10.3-1AZL-11500

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause; the Alpine secdb, CC BY-SA 4.0; Microsoft's Azure Linux vulnerability data, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpine.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

The most likely impact of this flaw is a Denial of Service in the application linked to the library. To reflect this, Red Hat Product Security has rated this flaw as having a moderate security impact.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 8libxml2-0:2.9.7-15.el8_7.1Fixed 2023-01-16RHSA-2023:0173
Red Hat Enterprise Linux 8.6 Extended Update Supportlibxml2-0:2.9.7-13.el8_6.4Fixed 2024-01-25RHSA-2024:0413
Red Hat Enterprise Linux 9libxml2-0:2.9.13-3.el9_1Fixed 2023-01-23RHSA-2023:0338
Red Hat JBoss Core Serviceslibxml2Fixed 2022-12-08RHSA-2022:8841
Red Hat Enterprise Linux 6libxml2Out of support scope
Red Hat Enterprise Linux 7libxml2Out of support scope

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2022-40304.

ICS advisories (CISA)

AdvisoryTitlePublishedSectorsAffectedFixed
ICSA-25-044-09Siemens SCALANCE W700 IEEE 802.11ax2025-02-11Chemical, Critical Manufacturing, Energy, Food and Agriculture, Water and Wastewater SystemsSCALANCE WAB762-1 (6GK5762-1AJ00-6AA0), SCALANCE WAM763-1 (6GK5763-1AL00-7DA0), SCALANCE WAM763-1 (ME) (6GK5763-1AL00-7DC0) and 16 morenone listed
ICSA-24-165-04Siemens ST7 ScadaConnect2024-06-11MultipleST7 ScadaConnect (6NH7997-5DA10-0AA0)none listed
ICSA-24-165-06Siemens TIM 1531 IRC2024-06-11MultipleSIPLUS TIM 1531 IRC (6AG1543-1MX00-7XE0), TIM 1531 IRC (6GK7543-1MX00-0XE0)none listed
ICSA-24-165-10Siemens SIMATIC and SIPLUS2024-06-11MultipleSIMATIC CP 1542SP-1 (6GK7542-6UX00-0XE0), SIMATIC CP 1542SP-1 IRC (6GK7542-6VX00-0XE0), SIMATIC CP 1543SP-1 (6GK7543-6WX00-0XE0) and 3 morenone listed
ICSA-23-348-10Siemens SIMATIC S7-15002023-12-12Critical Manufacturing, Transportation Systems, Energy, Healthcare and Public Health, Financial Services, Government Services and FacilitiesSIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AB0), SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AC0), SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP (6ES7518-4FX00-1AB0) and 2 morenone listed

From CISA's ICS advisories (CSAF), provided under CISA's notification. Only the facts are shown; each advisory is on CISA's page. Credits.

References

Check your stackJSON