cve.bz

CVE-2022-40674 Use After Free

8.1 highEPSS 2.4%Fix available

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

On this page
libexpat before 2.4.9 has a use-after-free in the doContent function in xmlparse.c.

Severity

CVSS 3.1

8.1 high
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
2.4% (unchanged from 2.4% a week ago; 2.2% 30 days ago) estimated probability of exploitation activity in the next 30 days; 84th 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: total, assessed 2025-05-30. 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-416 Use After 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-40674 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2022-40674?via=ask-ai-copy and https://cve.bz/cve/CVE-2022-40674?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-40674 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-40674

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-40674](https://cve.bz/cve/badge/CVE-2022-40674.svg)](https://cve.bz/cve/CVE-2022-40674)

HTML:

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

Affected

Versions

From the NVD's CPE matches.

ProductAffected
libexpat_project:libexpatbefore 2.4.9
debian:debian_linux10.0
debian:debian_linux11.0
fedoraproject:fedora35
fedoraproject:fedora36
fedoraproject:fedora37

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian10expat2.2.6-2+deb10u5DLA-3119-1
Debian11expat2.2.10-2+deb11u4DSA-5236-1
Debian12libxmltokno fix listedDEBIAN-CVE-2022-40674
Debian12, 13, 14expat2.4.8-2DEBIAN-CVE-2022-40674
Ubuntu16.04:LTStdom, smart, wbxml2 and 3 moreno fix listedUBUNTU-CVE-2022-40674
Ubuntu18.04:LTSexpat2.2.5-3ubuntu0.8UBUNTU-CVE-2022-40674 USN-5638-2
Ubuntu18.04:LTSfirefox107.0+build2-0ubuntu0.18.04.1UBUNTU-CVE-2022-40674 USN-5726-1
Ubuntu18.04:LTStdom, vnc4, smart and 3 moreno fix listedUBUNTU-CVE-2022-40674
Ubuntu20.04:LTSexpat2.2.9-1ubuntu0.5UBUNTU-CVE-2022-40674 USN-5638-2
Ubuntu20.04:LTSfirefox107.0+build2-0ubuntu0.20.04.1UBUNTU-CVE-2022-40674 USN-5726-1
Ubuntu20.04:LTStdom, coin3, wbxml2 and 2 moreno fix listedUBUNTU-CVE-2022-40674
Ubuntu22.04:LTSexpat2.4.7-1ubuntu0.1UBUNTU-CVE-2022-40674 USN-5638-2
Ubuntu22.04:LTS, 24.04:LTStdom, coin3, wbxml2 and 3 moreno fix listedUBUNTU-CVE-2022-40674
Ubuntu25.10, 26.10tdom, coin3, wbxml2 and 5 moreno fix listedUBUNTU-CVE-2022-40674
Ubuntu26.04:LTStdom, coin3, wbxml2 and 4 moreno fix listedUBUNTU-CVE-2022-40674
UbuntuPro:14.04:LTSexpat2.1.0-4ubuntu1.4+esm7UBUNTU-CVE-2022-40674 USN-5638-4
6 more for Ubuntu in the JSON and on Ubuntu's page.
Red Hatenterprise_linux:7::client, enterprise_linux:7::server, enterprise_linux:7::workstationexpat, expat-devel, expat-static and 1 more0:2.1.0-15.el7_9RHSA-2022:6834
Red Hatenterprise_linux:7::client, enterprise_linux:7::server, enterprise_linux:7::workstationfirefox, firefox-debuginfo0:102.3.0-7.el7_9RHSA-2022:6997
Red Hatenterprise_linux:7::client, enterprise_linux:7::server, enterprise_linux:7::workstationthunderbird, thunderbird-debuginfo0:102.3.0-4.el7_9RHSA-2022:6998
Red Hatenterprise_linux:7::computenodeexpat-devel, expat-static, expat-debuginfo0:2.1.0-15.el7_9RHSA-2022:6834
Red Hatenterprise_linux:8::appstreamfirefox, firefox-debuginfo, firefox-debugsource0:102.3.0-7.el8_6RHSA-2022:7024
Red Hatenterprise_linux:8::appstreamthunderbird, thunderbird-debuginfo, thunderbird-debugsource0:102.3.0-4.el8_6RHSA-2022:7023
Red Hatenterprise_linux:8::baseosexpat, expat-devel, expat-debuginfo and 1 more0:2.2.5-8.el8_6.3RHSA-2022:6878
Red Hatenterprise_linux:8::crbmingw-expat, mingw32-expat, mingw64-expat and 2 more0:2.4.8-2.el8RHSA-2023:3068
Red Hatenterprise_linux:9::appstreamexpat-devel, expat-debuginfo, expat-debugsource0:2.2.10-12.el9_0.3RHSA-2022:6838
Red Hatenterprise_linux:9::appstreamfirefox, firefox-debuginfo, firefox-debugsource0:102.3.0-7.el9_0RHSA-2022:7020
Red Hatenterprise_linux:9::appstreamthunderbird, thunderbird-debuginfo, thunderbird-debugsource0:102.3.0-4.el9_0RHSA-2022:7026
Red Hatenterprise_linux:9::baseosexpat, expat-debuginfo, expat-debugsource0:2.2.10-12.el9_0.3RHSA-2022:6838
12 more for Red Hat in the JSON and on Red Hat's page.
SUSEEnterprise Storage 6, Enterprise Storage 7, Linux Enterprise High Performance Computing 15 SP1-ESPOS and 19 moreexpat2.2.5-150000.3.22.1SUSE-SU-2022:3597-1
SUSELinux Enterprise Micro 5.3, Linux Enterprise Module for Basesystem 15 SP4expat2.4.4-150400.3.9.1SUSE-SU-2022:3489-1
SUSELinux Enterprise Server 12 SP2-BCL, Linux Enterprise Server 12 SP3-BCL, Linux Enterprise Server 12 SP4-LTSS and 6 moreexpat2.1.0-21.25.1SUSE-SU-2022:3466-1
openSUSELeap 15.3, Leap Micro 5.2expat2.2.5-150000.3.22.1SUSE-SU-2022:3597-1
openSUSELeap 15.4expat2.4.4-150400.3.9.1SUSE-SU-2022:3489-1
openSUSETumbleweedMozillaFirefox107.0-1.1openSUSE-SU-2024:12518-1
openSUSETumbleweedexpat2.4.9-1.1openSUSE-SU-2024:12359-1
openSUSETumbleweedfirefox-esr128.5.1-1.1openSUSE-SU-2024:14572-1
AlmaLinux8expat, expat-devel2.2.5-8.el8_6.3ALSA-2022:6878
AlmaLinux8firefox102.3.0-7.el8_6.almaALSA-2022:7024
AlmaLinux8mingw32-expat, mingw64-expat2.4.8-2.el8ALSA-2023:3068
AlmaLinux8thunderbird102.3.0-4.el8_6.almaALSA-2022:7023
AlmaLinux9expat, expat-devel2.2.10-12.el9_0.3ALSA-2022:6838
AlmaLinux9firefox102.3.0-7.el9_0.almaALSA-2022:7020
AlmaLinux9thunderbird102.3.0-4.el9_0.alma.plusALSA-2022:7026
Rocky Linux8expat0:2.2.5-8.el8_6.3RLSA-2022:6878
Rocky Linux8firefox0:102.3.0-7.el8_6RLSA-2022:7024
Rocky Linux8mingw-expat0:2.4.8-2.el8RLSA-2023:3068
Rocky Linux8thunderbird0:102.3.0-4.el8_6RLSA-2022:7023
Rocky Linux9expat0:2.2.10-12.el9_0.3RLSA-2022:6838
Alpinev3.13expat2.2.10-r7ALPINE-CVE-2022-40674
Alpinev3.14, v3.15, v3.16 and 8 moreexpat2.4.9-r0ALPINE-CVE-2022-40674
Azure Linux2expat2.4.8-2AZL-10921

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

Red Hat's statement

This flaw is rated as important because this flaw can easily compromise the confidentiality, integrity, or availability of resources but a successful attack can not execute arbitrary code, or allow remote users to cause a denial of service because attack complexity is high and depends on conditions beyond the attacker's control.

Red Hat's mitigation

There is no known mitigation other than restricting applications using the expat library from processing XML content. Please update the affected packages as soon as possible.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 6 Extended Lifecycle Supportexpat-0:2.0.1-15.el6_10Fixed 2022-10-12RHSA-2022:6921
Red Hat Enterprise Linux 6 Extended Lifecycle Supportcompat-expat1-0:1.95.8-9.el6_10Fixed 2022-10-17RHSA-2022:6967
Red Hat Enterprise Linux 7expat-0:2.1.0-15.el7_9Fixed 2022-10-06RHSA-2022:6834
Red Hat Enterprise Linux 7firefox-0:102.3.0-7.el7_9Fixed 2022-10-18RHSA-2022:6997
Red Hat Enterprise Linux 7thunderbird-0:102.3.0-4.el7_9Fixed 2022-10-18RHSA-2022:6998
Red Hat Enterprise Linux 8thunderbird-0:102.3.0-4.el8_6Fixed 2022-10-18RHSA-2022:7023
Red Hat Enterprise Linux 8firefox-0:102.3.0-7.el8_6Fixed 2022-10-18RHSA-2022:7024
Red Hat Enterprise Linux 8mingw-expat-0:2.4.8-2.el8Fixed 2023-05-16RHSA-2023:3068
Red Hat Enterprise Linux 8expat-0:2.2.5-8.el8_6.3Fixed 2022-10-11RHSA-2022:6878
Red Hat Enterprise Linux 8.1 Update Services for SAP Solutionsfirefox-0:102.3.0-7.el8_1Fixed 2022-10-18RHSA-2022:7019
Red Hat Enterprise Linux 8.1 Update Services for SAP Solutionsthunderbird-0:102.3.0-4.el8_1Fixed 2022-10-18RHSA-2022:7021
Red Hat Enterprise Linux 8.1 Update Services for SAP Solutionsexpat-0:2.2.5-3.el8_1.2Fixed 2022-10-06RHSA-2022:6833
Red Hat Enterprise Linux 8.2 Extended Update Supportthunderbird-0:102.3.0-4.el8_2Fixed 2022-10-18RHSA-2022:6996
Red Hat Enterprise Linux 8.2 Extended Update Supportfirefox-0:102.3.0-7.el8_2Fixed 2022-10-18RHSA-2022:7022
Red Hat Enterprise Linux 8.2 Extended Update Supportexpat-0:2.2.5-3.el8_2.3Fixed 2022-10-06RHSA-2022:6832
Red Hat Enterprise Linux 8firefox:flatpak/firefoxOut of support scope
Red Hat Enterprise Linux 8thunderbird:flatpak/thunderbirdOut of support scope
Red Hat Enterprise Linux 8xmlrpc-cNot affected
Red Hat Enterprise Linux 9firefox:flatpak/firefoxAffected
Red Hat Enterprise Linux 9thunderbird:flatpak/thunderbirdAffected
8 more in the JSON and on Red Hat's page.

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

ICS advisories (CISA)

AdvisoryTitlePublishedSectorsAffectedFixed
ICSA-25-105-08ABB M2M Gateway2025-04-07EnergyABB M2M Gateway ARM600, firmware versions = 4.1.2 <= 5.0.3, ABB M2M Gateway SW, software versions = 5.0.1 <= 5.0.3none 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
ICSA-23-143-01Hitachi Energy’s AFS65x, AFS67x, AFR67x and AFF66x Products2023-05-31EnergyAFS660/665S: <= 7.1.05, AFS660/665C: <= 7.1.05, AFS670v2: <= 7.1.05 and 4 morenone listed
ICSA-23-131-05Siemens SINEC NMS Third-Party2023-05-09MultipleSINEC NMSnone listed
ICSA-23-103-09Siemens SCALANCE XCM3322023-04-11MultipleSCALANCE XCM332 (6GK5332-0GA01-2AC2)none 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