LiveActive security incident?Get immediate response
CVE Record

CVE-2024-58378: Nokogiri before 1.16.2 Use-After-Free via xmlTextReader

Nokogiri before 1.15.6 and 1.16.x before 1.16.2 (CRuby, when using the packaged libxml2) is affected by a use-after-free vulnerability in libxml2 (CVE-2024-25062) in the xmlTextReader module, which underlies Nokogiri::XML::Reader. When using the XML Reader interface with DTD validation and XInclude expansion enabled, processing a crafted XML document can lead to an xmlValidatePopElement use-after-free. Nokogiri 1.15.6 and 1.16.2 resolve this by upgrading the packaged libxml2 to 2.11.7 and 2.12.5 respectively. JRuby and installations using system libxml2 are not affected.

CriticalCVSS 9.8Not KEV-listedUpdated
Glexia's TakeAutomated analysiscritical

Security readout for executives and security teams

Plain-English summary

A crafted XML document can trigger unsafe memory reuse in vulnerable Nokogiri installations, potentially affecting confidentiality, integrity, and availability. Risk is limited to CRuby using Nokogiri’s packaged libxml2 and the XML Reader with both DTD validation and XInclude expansion enabled.

Executive priority

Prioritize rapid investigation wherever applications ingest externally supplied XML. Expedite upgrades when every exposure condition is present. Configuration-specific prerequisites reduce breadth, but the 9.8 rating and potential impact across confidentiality, integrity, and availability justify urgent validation.

Technical view

CVE-2024-58378 is a CWE-416 use-after-free in libxml2’s xmlTextReader path underlying Nokogiri::XML::Reader. During crafted XML processing, the required DTD-validation and XInclude configuration can cause an xmlValidatePopElement use-after-free. The supplied CVSS 3.1 score is 9.8.

Likely exposure

Exposure requires all documented conditions: CRuby, Nokogiri’s packaged libxml2, Nokogiri::XML::Reader, DTD validation, XInclude expansion, and attacker-influenced XML. JRuby and installations linked to system libxml2 are explicitly outside the affected scope.

Exploitation context

The source bundle does not identify active exploitation, and the CVE is not listed as KEV in the supplied data. Treat malicious XML processing as a credible attack surface, but do not represent exploitation in the wild as established.

Researcher notes

Nokogiri 1.15.6 and 1.16.2 incorporate packaged libxml2 2.11.7 and 2.12.5 respectively. The bundle’s structured affected-version entries are ambiguous, so the narrative scope and vendor advisory should govern assessment: versions before those fixed releases are affected within their respective branches.

Mitigation direction

  • Upgrade Nokogiri 1.15.x to 1.15.6 or later.
  • Upgrade Nokogiri 1.16.x to 1.16.2 or later.
  • Disable unnecessary DTD validation or XInclude expansion pending upgrade.
  • Restrict untrusted XML from vulnerable Reader processing paths.

Validation and detection

  • Inventory Nokogiri versions across production and build artifacts.
  • Confirm whether CRuby uses Nokogiri’s packaged or system libxml2.
  • Search application paths for Nokogiri::XML::Reader usage.
  • Verify whether DTD validation and XInclude expansion are simultaneously enabled.
  • Confirm deployed Nokogiri resolves to 1.15.6, 1.16.2, or newer.
Prepared
Confidence
high
Sources
5

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-2024-58378 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
Critical
CVSS
9.8 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:N/AC:L/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.

2CVSS vectors
3Timeline events
1ADP providers
4Source links

SSVC decision data

CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: noneAutomatable: yesTechnical Impact: total

CVSS vector scores

2 official scores

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
9.8CVSS 3.1CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H3.95.9VulnCheck
9.3CVSS 4.0CriticalCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N——VulnCheck

Vulnerability scoring details

Base CVSS 4.0 score

9.3Critical
CVSS 4.0 vector shape for CVE-2024-58378Attack VectorAttack ComplexityAttack RequirementsPrivileges RequiredUser InteractionVS ConfidentialityVS IntegrityVS AvailabilitySS ConfidentialitySS IntegritySS Availability

Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Attack Requirements
NonePresent
Privileges Required
NoneLowHigh
User Interaction
NonePassiveActive
VS Confidentiality
HighLowNone
VS Integrity
HighLowNone
VS Availability
HighLowNone
SS Confidentiality
HighLowNone
SS Integrity
HighLowNone
SS Availability
HighLowNone

Vulnerability timeline

Timeline events are normalized from CVE metadata, CNA source timelines, ADP timelines, and KEV metadata when present.

  1. CVE reservedCVE Program

    The CVE ID was reserved by the assigning CNA.

  2. CVE publishedCVE Program

    The CVE record was published.

  3. CVE updatedCVE Program

    The CVE record metadata indicates this as the latest update time.

ADP provider summaries

CISA-ADPCISA ADP Vulnrichment
other:ssvc

Source materials

Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
sparklemotionnokogiri1.16.0, 1.16.2unaffected
sparklemotionnokogiri0, 1.15.6unaffected
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.