Repository navigation
chore(deps): update dependency nokogiri to v1.19.5 [security] - #3528
Open
renovate-bot wants to merge 1 commit into
Open
renovate-bot wants to merge 1 commit into
renovate-bot wants to merge 1 commit into
Conversation
renovate-bot
requested review from
apeabody,
bharathkkb,
g-awmalik and
q2w
as code owners
November 10, 2026 21:43
Collaborator
|
/gcbrun |
renovate-bot
force-pushed
the
renovate/infra-build-developer-tools-build-data-security-deps
branch
from
November 10, 2026 22:55
e1fe77a to
eadbcaa
Compare
Collaborator
|
/gcbrun |
renovate-bot
force-pushed
the
renovate/infra-build-developer-tools-build-data-security-deps
branch
from
November 11, 2026 05:58
eadbcaa to
5708006
Compare
Collaborator
|
/gcbrun |
renovate-bot
force-pushed
the
renovate/infra-build-developer-tools-build-data-security-deps
branch
from
November 12, 2026 17:25
5708006 to
266b531
Compare
Collaborator
|
/gcbrun |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
1.19.4→1.19.5Nokogiri: Mutation XSS through
noscriptcontent in Nokogiri's HTML5 serializerCVE-2026-126063 / GHSA-4p39-36wj-23h4
More information
Details
Summary
Nokogiri's HTML5 serializer did not escape text inside
noscriptelements, or<and>inside attribute values. When a document parsed with the default options is serialized, a browser with scripting enabled can parse the output into markup that Nokogiri's parser never produced. This is a mutation XSS for applications that sanitize untrusted HTML withNokogiri::HTML5, allownoscriptelements, and send the serialized output to browsers.Nokogiri 1.19.5 escapes both, as the HTML standard's serialization algorithm requires. Text inside
noscriptis still emitted unescaped for documents parsed withparse_noscript_content_as_text: true.Only the C extension (CRuby and TruffleRuby) is affected. JRuby does not implement
Nokogiri::HTML5.Severity
The Nokogiri maintainers have evaluated this as low severity (CVSS 2.3,
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N). Exploitation requires an application that allowsnoscriptin sanitized HTML. Loofah and rails-html-sanitizer do not allow it by default, and Sanitize always removes it.Mitigation
Upgrade to Nokogiri 1.19.5 or later.
Applications that sanitize HTML and allow
noscriptshould parse withparse_noscript_content_as_text: true(available since Nokogiri 1.17.0), or removenoscriptelements. This is the workaround for earlier versions, and it is recommended on every version: some content insidenoscriptis serialized unchanged, as the standard requires.Credit
This issue was responsibly reported by @a-zara-n.
Severity
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Nokogiri: Use-After-Free in Nokogiri when replacing an attribute value
CVE-2026-126064 / GHSA-3w22-6jfg-527w
More information
Details
Summary
Nokogiri's CRuby native extension could leave a Ruby wrapper pointing to freed memory when replacing the value of an existing XML attribute via
Nokogiri::XML::Node#[]=orNokogiri::XML::Node#lang=. If Ruby code had already accessed the attribute's child nodes, replacing the value could free those native child nodes while their wrappers remained reachable. Using one of those child nodes afterwards could cause an invalid read and a possible segfault.This is the same class of issue as GHSA-phwj-rprq-35pp, which was fixed for
Attr#value=in Nokogiri 1.19.4.Nokogiri 1.19.5 preserves all already-wrapped attribute child nodes before replacing the attribute value.
JRuby is not affected.
Severity
The Nokogiri maintainers have evaluated this as low severity. Reaching it requires an unusual API-usage pattern that does not arise during normal use. The application must directly access an attribute's child nodes and then replace that same attribute's value via
Node#[]=orNode#lang=. Nokogiri 1.19.5 makes this pattern safe with no change to the public API.Mitigation
Upgrade to Nokogiri 1.19.5 or later.
As a workaround, avoid accessing attribute child nodes directly via
Attr#childrenor similar before replacing the same attribute's value.Credit
This issue was responsibly reported by zx (@manus-pi).
Severity
CVSS:4.0/AV:L/AC:H/AT:P/PR:L/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
JRuby: NONET is bypassed for external DTDs and entities when the systemId uses a short-form IPv4 host
CVE-2026-126062 / GHSA-v995-44v6-5fqm
More information
Details
Summary
On JRuby, the
NONETparse option did not block an external DTD or entity whose system identifier used a short-form IPv4 host, such ashttp://127.1/orhttp://169.254.43518/, or was an absolute path such as/x.dtdin a document parsed from a network URL. An application that parses untrusted XML withDTDLOAD,DTDVALIDorNOENTcould be made to send network requests, potentially enabling SSRF.Nokogiri 1.19.5 applies the
XML::Schemacheck from GHSA-8678-w3jw-xfc2: withNONETset, only local resources are loaded.Only JRuby is affected. Default parse options are not affected.
Severity
The Nokogiri maintainers have evaluated this as low severity.
Mitigation
Upgrade to Nokogiri 1.19.5 or later, or do not enable
DTDLOAD,DTDVALIDorNOENTfor untrusted input.Credit
This issue was responsibly reported by @arpitjain099.
Severity
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
sparklemotion/nokogiri (nokogiri)
v1.19.5Compare Source
Security
Node#[]=orNode#lang=while Ruby objects still reference the attribute's children. See GHSA-3w22-6jfg-527w for more information.noscriptunless the document was parsed withparse_noscript_content_as_text: true, preventing a mutation XSS in applications that allownoscriptin sanitized HTML. A fragment now parsesnoscriptcontent the same way as its document, and raisesArgumentErrorif given a conflictingparse_noscript_content_as_text:value. Comments and raw-text elements insidenoscriptare still serialized unchanged, as the HTML standard requires, so applications that sanitize HTML and allownoscriptshould parse withparse_noscript_content_as_text: trueor removenoscriptelements. See GHSA-4p39-36wj-23h4 for more information.NONETnow blocks external DTDs and entities whose systemId uses a short-form IPv4 host such as127.1, or is an absolute path in a document parsed from a network URL. Previously Nokogiri fetched them over the network during a parse withDTDLOADorNOENT, potentially enabling SSRF. See GHSA-v995-44v6-5fqm for more information.Improved
ALLOCV_Ninstead ofrb_gc_register_address. (#3648) @jhawthornFixed
Node#namespace=now declares the namespace on the node when no declaration of its prefix is in scope there. Previously, on CRuby, a node given a namespace and then moved under an element that binds the same prefix, or the default namespace, to a different URI was serialized in that other namespace. On JRuby, the namespace was missing fromNode#namespace_definitions. (#3459, #3462) @flavorjonesXML::Readeris no longer affected by changes made to its source String after the reader is created. Previously, such a change could make the reader parse the changed String on JRuby, or changed or freed memory on CRuby with libxml2 < 2.11. (#3694) @flavorjonesNode#namespace = falsenow raisesTypeError. Previously it crashed the process on CRuby and raisedClassCastExceptionon JRuby. (#3719) @flavorjonesXML::XPathContext.newandXML::XPathContext#node=raiseTypeErrorwhen the argument is not aNode. Previously, on CRuby, most such arguments crashed the process. (#3720) @flavorjonesan+bselectors with a zero or negative step now follow the Selectors spec::nth-child(0n+3)matches only the third element (previously nothing),0n-1matches nothing instead of raisingZeroDivisionError, and-n+0/-2nmatch nothing instead of every (or every other) element. @afurm#id,.classand attribute selectors whose value contains a quote character, such as#it\'sor[a=\'b\'], now match that value. Previously they raisedNokogiri::XML::XPath::SyntaxErroror generated an XPath query with a different meaning. An#idselector containing an escaped newline no longer drops the text after it. (#3724, #3727) @flavorjones:contains()arguments, custom pseudo-class string arguments, and element names containing a CSS escape, such asp:contains('it\'s')ora\-b, now match. Previously they raisedNokogiri::XML::XPath::SyntaxError. An element name that is not an XML name after unescaping, such asa\!b, raisesNokogiri::CSS::SyntaxError, except as an unprefixed name in an HTML5 document, where it matches by local name. In ids, classes, attribute values, element names and string arguments, an escape for U+0000, a surrogate, or a code point above U+10FFFF now decodes to U+FFFD, and a vertical tab after a hexadecimal escape is no longer dropped, as CSS Syntax Level 3 requires. (#3728, #3729) @flavorjones[a\-b], now match. Previously they raisedNokogiri::XML::XPath::SyntaxError. An unprefixed attribute name that cannot be written as an XPath name test after unescaping, such as[\@click]or[\:class], matches an attribute with that exact name in no namespace. The HTML parsers create such attributes. A prefixed one, such as[x|a\!b], raisesNokogiri::CSS::SyntaxError. (#3732, #3735) @flavorjones<and>in attribute values as<and>, following whatwg/html#6362. Previously they were written literally. (#3529, #3741) @flavorjonesReader.outer_xmland.inner_xmlproperly capture syntax errors. (#3558) @flavorjonesXML::SAX::PushParserandHTML4::SAX::PushParserkeep parsing correctly after GC compaction relocates their SAX parser. (#3665) @zankerXML::Readerkeeps reading correctly when GC compaction runs. Previously, compaction could move the IO or String the reader was created from, and the reader then crashed or parsed the wrong bytes. (#3666, #3668) @zankerXSLT::Stylesheet#transformcalls custom XSLT extension functions correctly when GC compaction runs. Previously, after compaction moved a stylesheet that uses an extension module, a later transform raised an exception or crashed. (#3667) @jeremyXSLT::Stylesheet#transformpasses the correct params when GC compaction runs while it converts a param with#to_str. Previously, compaction could move the bytes of earlier short params, and the transform raisedRuntimeErroror silently left a param empty. (#3670) @flavorjonesXML::SAX::ParserContext.ioandHTML4::SAX::ParserContext.iokeep parsing correctly after GC compaction relocates the IO. (#3669) @zankerDocument#canonicalizepasses the correct inclusive namespace prefixes when it converts a prefix with#to_str, and when GC compaction runs during canonicalization. Previously, libxml2 could read freed or moved memory, and the output lost namespaces or Ruby crashed. Raising on a prefix with a null byte also no longer leaks memory. (#3714, #3750) @Priyank-gouda678 @flavorjonesXSLT::Stylesheet#transformcalls custom XSLT extension functions correctly when GC compaction runs during the transform. Previously, compaction could move an extension handler instance, and a later call to one of its functions raised an exception or crashed. (#3748) @flavorjonesXSLT::Stylesheet#transformcalls custom XSLT extension functions correctly after an extension function runs another transform with the same stylesheet, or while another thread does. Previously, the inner or concurrent transform released extension handler instances that the other transform still used, and GC could free them. (#3748) @flavorjonesXML::Reader.from_memoryaccepts an object that responds toto_str. Previously, it could raiseNokogiri::XML::SyntaxError. (#3694) @flavorjonesXPathContext#evaluateno longer leaks memory when a custom XPath function handler raises an exception. (#3715, #1610) @flavorjonesXPathContext#evaluatenow resets libxml2's error handlers and unregisters the custom function lookup. Previously, libxml2 could keep references to garbage-collected Ruby objects. (#3715) @flavorjonesgumbo_parse_with_optionsno longer crashes whenstop_on_first_erroris set and the parse ends on an unknown end tag in a fragment context. This is a C API path; it is not reachable from Ruby, because Nokogiri never setsstop_on_first_error. (#3672) @jeremyNode#namespace_definitionsso that it now behaves identically to CRuby. (#2543, #3460) @flavorjonesTypeErrorwhen the context node or one of its ancestors is an element whosenamereturns something other than aString. Previously this could crash the process. (#3740) @flavorjones</body>and a<frameset>start tag follows the comment. (#3744) @flavorjonesreadraises an exception that is not aStandardError, such asInterruptorTimeout::ExitException, parsing withXML::Document,HTML4::DocumentorXML::Readerno longer leaks memory or leaves behind a stale libxml2 error handler. (#3718, #3721) @Priyank-gouda678 @flavorjonesrb_len_ttype. Previously compilation failed with an incompatible pointer type error inxml_node_set.c. (#3711) @larskanisNode#line=now raisesNoMethodErroronDocument,DTD,Attr,ElementDecl,AttributeDeclandEntityDecl, as#linealready does on all of them exceptAttr. Previously it wrote past the end of the node's memory or overwrote an unrelated field, which could crash the process. (#3737, #3738) @Priyank-gouda678 @flavorjonesDocument#create_elementandNode.newno longer set the namespace to the document's default namespace. The namespace must be set explicitly withnamespace=or by parenting the node. (#3457, #3463) @flavorjonesWEB-INF/lib. Previously they raisedDTMConfigurationException: No default implementation found. Nokogiri also no longer sets the JVM-wide system propertyorg.apache.xml.dtm.DTMManager, which made XSLT transformations and other Xalan users in the same JVM fail in that setup. (#3707) @flavorjonesConfiguration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.