CVE-2022-40674: libexpat before 2.4.9 has a use-after-free in the doContent function in xmlparse.c.
CVE-2022-40674 is a vulnerability in libexpat before 2.4.9 has a use-after-free in the doContent function in xmlparse.c., rated Important by Microsoft, with a CVSS 3.1 base score of 8.1 (High). An attacker can exploit it remotely over the network, without any privileges and without user interaction. Microsoft has not reported exploitation in the wild. The EPSS model estimates a 2.25% probability of exploitation activity in the next 30 days, higher than 83% of all scored vulnerabilities. Microsoft released the fix on 15 September 2022, outside Patch Tuesday. It affects 2 products in 1 product family (Other).
Key facts
- CVE ID
- CVE-2022-40674
- Severity
- High CVSS 8.1
- Microsoft severity
- Important
- Exploited in the wild
- No
- Publicly disclosed
- No
- Weakness
- CWE-416
- EPSS
- 2.25% (percentile 83%)
- CISA KEV
- Not listed
- Released
- Last updated
- Patch Tuesday
- September 2022 Patch Tuesday
- Product families
- Other
CVSS score and vector
Microsoft scores CVE-2022-40674 at 8.1 (temporal 8.1) using CVSS 3.1. Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
| Metric | Value |
|---|---|
| Attack vector | Network |
| Attack complexity | High |
| Privileges required | None |
| User interaction | None |
| Scope | Unchanged |
| Confidentiality impact | High |
| Integrity impact | High |
| Availability impact | High |
Frequently asked questions (Microsoft)
Is Azure Linux the only Microsoft product that includes this open-source library and is therefore potentially affected by this vulnerability?
One of the main benefits to our customers who choose to use the Azure Linux distro is the commitment to keep it up to date with the most recent and most secure versions of the open source libraries with which the distro is composed. Microsoft is committed to transparency in this work which is why we began publishing CSAF/VEX in October 2025. See this blog post for more information. If impact to additional products is identified, we will update the CVE to reflect this.
Affected products (2)
Other
| Product | Security update | Type | Fixed build | Restart |
|---|---|---|---|---|
| 18618-16820 | CBL-Mariner Releases | Security Update | 2.4.9-1 | No |
| 18619-16823 | CBL-Mariner Releases | Security Update | 2.4.8-2 | No |
NIST NVD data
- NVD status
- Modified
- NVD CVSS
- 8.1 (HIGH)
- NVD weakness
- CWE-416
- Published to NVD
- NVD last modified
Affected configurations (CPE)
| Product | Vulnerable versions |
|---|---|
| libexpat | before 2.4.9 |
| debian linux 10.0 | all listed versions |
| debian linux 11.0 | all listed versions |
| fedora 35 | all listed versions |
| fedora 36 | all listed versions |
| fedora 37 | all listed versions |
References
- 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)
- 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)
- https://cert-portal.siemens.com/productcert/html/ssa-398330.html
- https://cert-portal.siemens.com/productcert/html/ssa-558014.html
- https://cert-portal.siemens.com/productcert/html/ssa-892048.html
Revision history
| Version | Date | Description |
|---|---|---|
| 1.0 | Information published. | |
| 1.1 | Added expat to CBL-Mariner 1.0 | |
| 1.2 | Information published. |