LiveActive security incident?Get immediate response
CVE Record

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

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

HighCVSS 8.1Not KEV-listedUpdated
Glexia's TakeAutomated analysishigh

Security readout for executives and security teams

Plain-English summary

Expat is a widely embedded XML parser. Versions before 2.4.9 have a memory safety flaw that can corrupt process memory while parsing XML. A successful attack could affect confidentiality, integrity, and availability, but the CVSS vector rates exploit complexity as high. Prioritize systems processing untrusted XML.

Executive priority

Treat as a high-priority dependency update for internet-facing or partner-facing XML processing. It is not evidenced as actively exploited here, but Expat's wide reuse means exposure may be hidden in operating systems, containers, and vendor products.

Technical view

CVE-2022-40674 is a CWE-416 use-after-free in libexpat's doContent function in xmlparse.c, affecting libexpat before 2.4.9. The supplied CVSS v3.1 score is 8.1: network reachable, no privileges or user interaction required, high complexity, and high C/I/A impact.

Likely exposure

Exposure is likely where applications, OS packages, runtimes, or appliances parse attacker-controlled XML with libexpat before 2.4.9. The bundle does not provide a complete affected product list; downstream vendor advisories and local package inventories are needed to confirm impact.

Exploitation context

The bundle does not identify active exploitation, and KEV status is false. Risk depends on whether untrusted XML reaches vulnerable Expat code paths. High attack complexity reduces likelihood, but no-auth network reachability and high impact justify timely remediation.

Researcher notes

Focus validation on dependency provenance and reachable XML parsing paths, not only package names. Distro fixed builds may use backported patches rather than version 2.4.9 exactly. The supplied sources do not include proof-of-concept details or confirmed exploitation.

Mitigation direction

  • Upgrade libexpat to 2.4.9 or a vendor-backported fixed package.
  • Apply relevant Debian, Gentoo, Fedora, or appliance vendor security updates.
  • Inventory bundled Expat copies in applications and containers.
  • Reduce exposure of services that process untrusted XML until patched.
  • Check vendor guidance for products with embedded Expat.

Validation and detection

  • Confirm installed Expat package or embedded library versions.
  • Review SBOMs and container images for libexpat before 2.4.9.
  • Map XML ingestion points that accept untrusted input.
  • Verify vendor advisories mark the installed build as fixed.
  • Run regression tests for XML parsing after patching.
Prepared
Confidence
high
Sources
10

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · low confidence lookup

CWE-416: Exact CWE lookup

Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2022-40674 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
High
CVSS
8.1 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
0Timeline events
0ADP providers
13Source links

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
8.1CVSS 3.1HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H2.25.9Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

8.1High
CVSS 3.1 vector shape for CVE-2022-40674Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone

Source materials

Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
n/an/an/aListed
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-416 · source CWE mapping

Use After Free

Use After Free represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.