PatchSiren

PatchSiren cyber security CVE debrief

CVE-2026-57236 sparklemotion CVE debrief

A vulnerability in Nokogiri, a Ruby library for parsing XML and HTML, allows for a segfault or information leak when setting an invalid encoding. This issue, fixed in version 1.19.4, affects the CRuby implementation but not JRuby. The vulnerability arises from calling Document#encoding= with an invalid encoding, which can lead to the document referencing freed memory. This can cause a segfault or leak freed bytes into a Ruby String. Defenders should verify their Nokogiri version and upgrade to 1.19.4 if necessary to mitigate this vulnerability.

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 systems using Nokogiri should verify their version and upgrade to 1.19.4 if necessary. This includes operators of systems that use Nokogiri for parsing XML and HTML, as well as security teams and vulnerability management teams. The vulnerability can have a significant impact on system stability and security if not mitigated.

Why it matters

A vulnerability in Nokogiri allows for a segfault or information leak when setting an invalid encoding, affecting the CRuby implementation. Defenders should verify their Nokogiri version and upgrade to 1.19.4 if necessary.

  • Potential segfault or information leak
  • Need to verify Nokogiri version and upgrade to 1.19.4
  • Possible impact on system stability and security

Technical summary

The Nokogiri library for Ruby has a vulnerability that allows for a segfault or information leak when setting an invalid encoding. This issue affects the CRuby implementation but not JRuby. The vulnerability is caused by calling Document#encoding= with an invalid encoding, which can lead to the document referencing freed memory. The vulnerability is fixed in version 1.19.4. Defenders should prioritize verifying their Nokogiri version and upgrading to 1.19.4 if necessary to mitigate this vulnerability. The vulnerability can be exploited by setting an invalid encoding, which can lead to a segfault or information leak.

Defensive priority

Defenders should prioritize verifying their Nokogiri version and upgrading to 1.19.4 if necessary.

Recommended defensive actions

  • Verify Nokogiri version and upgrade to 1.19.4 if necessary
  • Review and update affected systems
  • Monitor for potential exploitation attempts
  • Confirm whether affected product deployments exist in managed environments and assign an owner for follow-up
  • Review compensating controls for exposed systems while remediation is scheduled and verified
  • Check relevant monitoring, detection, and logs for exposed assets that need extra review
  • Track exceptions, retest remediated assets, and close the item only after evidence is documented

Evidence notes

The vulnerability is described in the CVE record and the Nokogiri advisory. The issue is caused by setting an invalid encoding, which can lead to a segfault or information leak. The CVE record was published on 2026-06-25T15:16:40.627Z and has not been modified since then. The vulnerability affects the CRuby implementation of Nokogiri, but not JRuby. The fix is included in version 1.19.4. Defenders should verify their Nokogiri version and consider upgrading to 1.19.4 if necessary.

Sources and references

Verified primary and authoritative sources

  • CVE-2026-57236 CVE Program record

    Publisher, destination, and source semantics verified

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

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

  • CVE-2026-57236 NVD vulnerability detail

    Publisher, destination, and source semantics verified

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

    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-5v8h-3h3q-446p

    [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.