GHSA-q7wx-62r7-j2x7 CVE-2015-1819
Nokogiri vulnerable to libxml XML Entity Expansion
- Severity
- Medium
- The publisher's own rating, not a CVSS score
- Exploit chance (EPSS)
- 6.29%
- Chance of exploitation in the next 30 days. Higher than 93.59% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-776 Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion')
- Fix
1.6.6.4- Upgrade nokogiri to this version or later
Description
The xmlreader in libxml allows remote attackers to cause a denial of service (memory consumption) via crafted XML data, related to an XML Entity Expansion (XEE) attack.
Affected versions
RubyGems
| Package | Vulnerable | Fixed in |
|---|---|---|
| nokogiri | >= 1.6.6.0, < 1.6.6.4 |
1.6.6.4 |
How to fix
Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.
nokogiri RubyGems → 1.6.6.4
- bundler
bundle update nokogiri # Gemfile: gem "nokogiri", ">= 1.6.6.4"
Weakness
CWE-776: Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion')
The product uses XML documents and allows their structure to be defined with a Document Type Definition (DTD), but it does not properly control the number of recursive definitions of entities.
How to prevent it
- Operation: If possible, prohibit the use of DTDs or use an XML parser that limits the expansion of recursive DTD entities.
- Implementation: Before parsing XML files with associated DTDs, scan for recursive entity declarations and do not continue parsing potentially explosive content.
References
Advisories
Other links
- github.com/sparklemotion/nokogiri/issues/1374
- git.gnome.org/browse/libxml2/commit
- github.com/rubysec/ruby-advisory-db/blob/master/gems/nokogiri/CVE-2015-1819.yml
- security.gentoo.org/glsa/201507-08
- security.gentoo.org/glsa/201701-37
- support.apple.com/HT206166
- support.apple.com/HT206167
- support.apple.com/HT206168
- support.apple.com/HT206169
- lists.apple.com/archives/security-announce/2016/Mar/msg00000.html
- lists.apple.com/archives/security-announce/2016/Mar/msg00001.html
- lists.apple.com/archives/security-announce/2016/Mar/msg00002.html
- lists.apple.com/archives/security-announce/2016/Mar/msg00004.html
- lists.fedoraproject.org/pipermail/package-announce/2015-November/172710.html
- lists.fedoraproject.org/pipermail/package-announce/2015-November/172943.html
- lists.opensuse.org/opensuse-updates/2015-12/msg00120.html
- lists.opensuse.org/opensuse-updates/2016-01/msg00031.html
- rhn.redhat.com/errata/RHSA-2015-1419.html
- rhn.redhat.com/errata/RHSA-2015-2550.html
- debian.org/security/2015/dsa-3430
- oracle.com/technetwork/topics/security/bulletinoct2015-2511968.html
- oracle.com/technetwork/topics/security/linuxbulletinoct2015-2719645.html
- ubuntu.com/usn/USN-2812-1
- xmlsoft.org/news.html
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| GHSA-phwj-rprq-35pp Nokogiri: Possible Use-After-Free when setting an attribute value via `Nokogiri::XML::Attr#value=` or `#content=` | High | Also affects nokogiri |
| GHSA-wfpw-mmfh-qq69 Nokogiri: Possible Use-After-Free in XInclude Processing | Low | Also affects nokogiri |
| GHSA-p67v-3w7g-wjg7 Nokogiri: Possible Use-After-Free when directly using `NokogirI::XML::XPathContext` beyond document lifetime | Medium | Also affects nokogiri |
| GHSA-wjv4-x9w8-wm3h Nokogiri: Possible Use-After-Free when setting `Document#root=` to an invalid node type | Medium | Also affects nokogiri |
| GHSA-5prr-v3j2-97mh Nokogiri: Possible Out-of-Bounds Read in `Nokogiri::XML::NodeSet#[]` | High | Also affects nokogiri |
| GHSA-9cv2-cfxc-v4v2 Nokogiri: Null Pointer Dereference calling methods on uninitialized wrapper classes | High | Also affects nokogiri |
| GHSA-8678-w3jw-xfc2 Nokogiri: XML::Schema on JRuby allows network requests when NONET is set, bypassing CVE-2020-26247 | Low | Also affects nokogiri |
| GHSA-5v8h-3h3q-446p Nokogiri: Possible Use-After-Free when `Nokogiri::XML::Document#encoding=` raises an exception | High | Also affects nokogiri |
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor