Nokogiri subject to DoS via libxml2 vulnerability
Published 21 Aug 2018 · Updated 29 Nov 2024
Is your project on an affected nokogiri?
Look after several Rails or Ruby apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected package
- Affected
- >=1.6.0 <1.6.7.1
- Fixed in
- 1.6.7.1
bundle update --conservative nokogiri # Gemfile: '>= 1.6.7.1'Details
The xmlStringLenDecodeEntities function in parser.c in libxml2 before 2.9.3 (as used in nokogiri before 1.6.7.1) does not properly prevent entity expansion, which allows context-dependent attackers to cause a denial of service (CPU consumption) via crafted XML data, a different vulnerability than CVE-2014-3660.
Is GHSA-xjqg-9jvg-fgx2 in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected nokogiri, and gives you the command that fixes it.
More advisories for nokogiri
- LowCVE-2026-126062JRuby: NONET is bypassed for external DTDs and entities when the systemId uses a short-form IPv4 host · 10 Nov 2026
- LowCVE-2026-126064Nokogiri: Use-After-Free in Nokogiri when replacing an attribute value · 10 Nov 2026
- LowCVE-2026-126063Nokogiri: Mutation XSS through `noscript` content in Nokogiri's HTML5 serializer · 10 Nov 2026
- LowCVE-2026-57435Nokogiri: Possible Use-After-Free when setting an attribute value via `Nokogiri::XML::Attr#value=` or `#content=` · 19 Jun 2026
- LowCVE-2026-57438Nokogiri: Possible Use-After-Free in XInclude Processing · 19 Jun 2026
- LowCVE-2026-57437Nokogiri: Possible Use-After-Free when directly using `NokogirI::XML::XPathContext` beyond document lifetime · 19 Jun 2026
References
- Advisorynvd.nist.gov/vuln/detail/CVE-2015-5312
- Linkbugzilla.redhat.com/show_bug.cgi?id=1276693
- Linkgit.gnome.org/browse/libxml2/commit/?id=69030714cde66d525a8884bda01b9e8f0abf8e1e
- Linkgithub.com/rubysec/ruby-advisory-db/blob/master/gems/nokogiri/CVE-2015-5312.yml
- Linkgroups.google.com/forum/#!topic/ruby-security-ann/aSbgDiwb24s
- Linkh20566.www2.hpe.com/portal/site/hpsc/public/kb/docDisplay?docId=emr_na-c04944172
- Linksecurity.gentoo.org/glsa/201701-37
- Linksupport.apple.com/HT206166
- Linksupport.apple.com/HT206167
- Linksupport.apple.com/HT206168
- Linksupport.apple.com/HT206169
- Linklists.apple.com/archives/security-announce/2016/Mar/msg00000.html
- Linklists.opensuse.org/opensuse-updates/2015-12/msg00120.html
- Linklists.opensuse.org/opensuse-updates/2016-01/msg00031.html
- Linkmarc.info/?l=bugtraq&m=145382616617563&w=2
- Linkrhn.redhat.com/errata/RHSA-2015-2549.html
- Linkrhn.redhat.com/errata/RHSA-2015-2550.html
- Linkwww.debian.org/security/2015/dsa-3430
- Linkwww.oracle.com/technetwork/topics/security/bulletinjan2016-2867206.html
- Linkwww.oracle.com/technetwork/topics/security/linuxbulletinoct2015-2719645.html
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.