Skip to content

Commit fbe19bf

Browse files
authored
One more nokogiri advisory (#1142)
1 parent 39a8dc8 commit fbe19bf

1 file changed

Lines changed: 48 additions & 0 deletions

File tree

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
gem: nokogiri
3+
ghsa: g9g8-vgvw-g3vf
4+
url: https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-g9g8-vgvw-g3vf
5+
title: Possible invalid memory read when calling
6+
`Nokogiri::XML::Node#initialize_copy_with_args` with
7+
incorrect argument type
8+
date: 2026-06-19
9+
description: |
10+
## Summary
11+
12+
The protected copy helper behind Node#dup and #clone unwrapped its
13+
source argument as an xmlNode without a type check.
14+
Supplying a non-Node (e.g. a Namespace) made it read an xmlNs
15+
out of bounds, crashing the process.
16+
17+
Nokogiri 1.19.4 performs a type check and raises TypeError when an
18+
argument of invalid type is passed.
19+
20+
Only CRuby is affected. JRuby is not affected.
21+
22+
## Severity
23+
24+
The Nokogiri maintainers have evaluated this as low severity.
25+
This is only triggered by a programming error. It requires application
26+
code to call the protected internal initialize_copy_with_args method
27+
with an argument that is not a Nokogiri::XML::Node.
28+
Nokogiri 1.19.4 now raises TypeError instead of reading out of bounds.
29+
It cannot be triggered by untrusted input or through normal use of
30+
the public API.
31+
32+
## Mitigation
33+
34+
Upgrade to Nokogiri 1.19.4 or later. There is no workaround.
35+
36+
## Credit
37+
38+
This issue was responsibly reported by Zheng Yu from depthfirst.com.
39+
patched_versions:
40+
- ">= 1.19.4"
41+
related:
42+
url:
43+
- https://rubygems.org/gems/nokogiri/versions/1.19.4
44+
- https://github.com/sparklemotion/nokogiri/releases/tag/v1.19.4
45+
- https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-g9g8-vgvw-g3vf
46+
notes: |
47+
- no CVE number
48+
- No [cvss_v2, cvss_v3, cvss_v4] on GHSA file

0 commit comments

Comments
 (0)