CVE-2022-40674

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

Published: 2022-09-14 Last update: 2025-05-30 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2022-40674 is rated Moderate Risk (59.3/100): CVSS High severity, with medium exploitation likelihood (EPSS 0.94%). Mandatory action: Review affected assets and schedule remediation.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Exploit prediction scoring system (EPSS) score for CVE-2022-40674

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-05-26 0.79% 0.94% +0.15%
2 2026-05-22 0.92% 0.79% -0.13%
3 2026-05-13 0.92%

Full EPSS history (45 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2022-40674

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
8.1 3.1 HIGH
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:H)
Even with access, the exploit needs extra luck, timing, or a fussy environment to actually work.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
2.2 5.9 [email protected]
8.1 3.1 HIGH
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:H)
Even with access, the exploit needs extra luck, timing, or a fussy environment to actually work.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
2.2 5.9 134c704f-9b21-4f2e-91b3-4a467353bcc0

Weakness enumeration for CVE-2022-40674

OS Trackers for CVE-2022-40674

vendor priority summary link
alpine CVE-2022-40674: 1 source package rows (expat); 7 state rows across 7 repos (3.17-main, 3.18-main, 3.19-main, 3.20-main, 3.21-main, 3.22-main, edge-main); fixed 7, open 0. https://security.alpinelinux.org/vuln/CVE-2022-40674
debian not yet assigned CVE-2022-40674 not yet assigned priority: Debian including 2 source packages (expat, libxmltok), 7 status rows across 5 suites (bookworm, bullseye, forky, sid, trixie): resolved 5, open 2. https://security-tracker.debian.org/tracker/CVE-2022-40674
gentoo high CVE-2022-40674: 2 GLSA(s) (202209-24, 202211-06), 3 atom(s) (dev-libs/expat, www-client/firefox, www-client/firefox-bin); latest impact high. https://bugs.gentoo.org/buglist.cgi?quicksearch=CVE-2022-40674
redhat high https://access.redhat.com/security/cve/CVE-2022-40674
suse high CVE-2022-40674 severity important: SUSE including 399 source package names (0.0.17-1.1:libexpat1-2.4.4-150400.3.9.1, 0.1.6-1.2:libexpat1-2.4.4-150400.3.9.1, …), 926 product×package rows across 400 product lines (Container bci/bci-base-fips, Container bci/bci-init, … (400 product lines)): Fixed 822, Known Affected 104. https://www.suse.com/security/cve/CVE-2022-40674/
ubuntu medium CVE-2022-40674 medium priority: Ubuntu including 24 source packages (apache2, apr-util, …), 270 status rows across 13 suites (bionic, focal, jammy, kinetic, lunar, mantic, noble, oracular, plucky, questing, trusty, upstream, xenial): ignored 107, not-affected 78, needs-triage 39, DNE 23, released 15, needed 8. https://ubuntu.com/security/CVE-2022-40674

Affected software / configurations for CVE-2022-40674

Vendor Product Version Raw CPE
libexpat_project libexpat < 2.4.9 cpe:2.3:a:libexpat_project:libexpat:*:*:*:*:*:*:*:*
debian debian_linux 10.0 cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*
debian debian_linux 11.0 cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*
fedoraproject fedora 35 cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:*
fedoraproject fedora 36 cpe:2.3:o:fedoraproject:fedora:36:*:*:*:*:*:*:*
fedoraproject fedora 37 cpe:2.3:o:fedoraproject:fedora:37:*:*:*:*:*:*:*

References for CVE-2022-40674

URL Tags
https://github.com/libexpat/libexpat/pull/629 Issue Tracking Patch Third Party Advisory
https://github.com/libexpat/libexpat/pull/640 Issue Tracking Patch Third Party Advisory
https://lists.debian.org/debian-lts-announce/2022/09/msg00029.html Issue Tracking Third Party Advisory
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/GSVZN3IJ6OCPSJL7AEX3ZHSHAHFOGESK/
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/J2IGJNHFV53PYST7VQV3T4NHVYAMXA36/
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/LQB6FJAM5YQ35SF5B2MN25Y2FX56EOEZ/
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/WE2ZKEPGFCZ7R6DRVH3K6RBJPT42ZBEG/
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/XCGBVQQ47URGJAZWHCISHDWF6QBTV2LE/
https://security.gentoo.org/glsa/202209-24 Third Party Advisory
https://security.gentoo.org/glsa/202211-06 Third Party Advisory
https://security.netapp.com/advisory/ntap-20221028-0008/ Third Party Advisory
https://www.debian.org/security/2022/dsa-5236 Third Party Advisory
cvelogic Threat Intelligence