A security advisory for the Nokogiri Ruby gem (GHSA-g9g8-vgvw-g3vf) discloses a low-severity vulnerability where the protected copy helper behind Node#dup and #clone failed to type-check its source argument. Passing a non-Node object (e.g., a Namespace) caused an out-of-bounds read of an xmlNs struct, crashing the process. Only CRuby is affected; JRuby is not. The issue is triggered only by a programming error calling the internal `initialize_copy_with_args` method with an invalid argument type — it cannot be triggered by untrusted input or normal public API usage. Nokogiri 1.19.4 fixes this by adding a type check and raising TypeError instead. Upgrade to 1.19.4 or later; no workaround exists.

1m read timeFrom rubysec.com
Post cover image
Table of contents
SummarySeverityMitigationCredit
228 Impressions