Advisory Database
  • Advisories
  • Dependency Scanning
  1. gem
  2. ›
  3. nokogiri
  4. ›
  5. GHSA-wfpw-mmfh-qq69

GHSA-wfpw-mmfh-qq69: Nokogiri: Possible Use-After-Free in XInclude Processing

June 19, 2026

XInclude substitution performed by Nokogiri::XML::Node#do_xinclude replaced each <xi:include> in place, freeing the include node along with its children (such as <xi:fallback> and its descendants) and any namespaces declared on them. If an application had already exposed one of those nodes or namespaces to Ruby, the corresponding Ruby object was left pointing at freed memory. Using the object could result in invalid reads or writes to memory.

Nokogiri 1.19.4 substitutes each <xi:include> on a defensive copy by default, so the structures libxml2 frees are never the ones bound to live Ruby objects.

Only the CRuby implementation is affected; JRuby is not affected.

References

  • github.com/advisories/GHSA-wfpw-mmfh-qq69
  • github.com/sparklemotion/nokogiri/security/advisories/GHSA-wfpw-mmfh-qq69

Code Behaviors & Features

Detect and mitigate GHSA-wfpw-mmfh-qq69 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 1.19.4

Fixed versions

  • 1.19.4

Solution

Upgrade to version 1.19.4 or above.

Weakness

  • CWE-416: Use After Free

Source file

gem/nokogiri/GHSA-wfpw-mmfh-qq69.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Tue, 23 Jun 2026 12:23:00 +0000.