PatchSiren

PatchSiren cyber security CVE debrief

CVE-2026-57435 sparklemotion CVE debrief

A vulnerability in Nokogiri, an open-source XML and HTML library for Ruby, could allow an attacker to cause an invalid read and possible segfault when replacing the value of an XML attribute. This issue was fixed in Nokogiri version 1.19.4. The vulnerability arises from Nokogiri's CRuby native extension leaving a Ruby wrapper pointing to freed memory when replacing the value of an XML attribute. If Ruby code had already accessed an attribute child node, Nokogiri::XML::Attr#value= could free the underlying native child node while the wrapper remained reachable through the document node cache. A later use of the freed child node or a Ruby GC mark could dereference an invalid pointer,

Vendor
sparklemotion
Product
nokogiri
CVSS
LOW 1.7
CISA KEV
Not listed in stored evidence
Original CVE published
2026-06-25
Original CVE updated
2026-10-25
Advisory published
2026-06-25
Advisory updated
2026-10-25

Who should care

Defenders responsible for Ruby applications using Nokogiri should assess exposure and prioritize upgrading to Nokogiri version 1.19.4 or later. This involves reviewing the current version of Nokogiri in use, identifying systems and applications that rely on it, and planning for an upgrade to mitigate the vulnerability. Additionally, defenders should consider the potential operational impacts of a successful exploit, including potential segfaults and

Why it matters

A vulnerability in Nokogiri could allow an attacker to cause an invalid read and possible segfault when replacing the value of an XML attribute. Defenders should prioritize verifying and upgrading to Nokogiri version 1.19.4 or later to mitigate this vulnerability.

  • Potential segfaults and invalid reads could occur if the vulnerability is exploited
  • Defenders should verify and upgrade to Nokogiri version 1.19.4 or later to mitigate this vulnerability
  • Affected systems and applications should be reviewed and updated

Technical summary

Nokogiri's CRuby native extension could leave a Ruby wrapper pointing to freed memory when replacing the value of an XML attribute. If Ruby code had already accessed an attribute child node, Nokogiri::XML::Attr#value= could free the underlying native child node while the wrapper remained reachable through the document node cache. A later use of the freed child node or a Ruby GC mark could dereference an invalid pointer, causing an invalid read and a possible segfault.

Defensive priority

Defenders should prioritize verifying and upgrading to Nokogiri version 1.19.4 or later to mitigate this vulnerability.

Recommended defensive actions

  • Verify Nokogiri version and upgrade to 1.19.4 or later
  • Review and update affected systems and applications
  • Monitor for potential segfaults and invalid reads
  • Confirm whether affected product deployments exist in managed environments and assign an owner for follow-up
  • Review the supplied official advisory or CVE record to validate affected scope, severity, and vendor guidance
  • Plan vendor-supported updates or mitigations through normal change control where exposure is confirmed
  • Check relevant monitoring, detection, and logs for exposed assets that need extra review

Evidence notes

The vulnerability is described in the Nokogiri security advisory and CVE record. The issue is caused by Nokogiri's CRuby native extension leaving a Ruby wrapper pointing to freed memory when replacing the value of an XML attribute.

Sources and references

Verified primary and authoritative sources

  • CVE-2026-57435 CVE Program record

    Publisher, destination, and source semantics verified

    URL: https://www.cve.org/CVERecord?id=CVE-2026-57435

    CVE Program - Official CVE Program record with source-provided CVE metadata.

  • CVE-2026-57435 NVD vulnerability detail

    Publisher, destination, and source semantics verified

    URL: https://nvd.nist.gov/vuln/detail/CVE-2026-57435

    NIST National Vulnerability Database - Official NIST NVD detail page and source-specific vulnerability assessment.

Supplemental references

  • Source reference

    Unverified legacy reference

    URL: https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-phwj-rprq-35pp

    [email protected] - Mitigation, Vendor Advisory

Methodology and review provenance

AI-assisted synthesis based on stored public vulnerability evidence. System validation, approval state, and publication status do not by themselves establish human review of this revision. PatchSiren helps prioritize defensive review and does not prove exposure or remediation on any system.