CVE-2015-1819: Nokogiri Nokogiri Vulnerable To Libxml XML Vulnerability

MODERATE
Advisory Identifier: GHSA-q7wx-62r7-j2x7
CWE-776
Published
Advisory Summary

CVE-2015-1819 is a MODERATE nokogiri vulnerable to libxml xml vulnerability (CWE-776: Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion')) affecting Nokogiri libraries in the RubyGems ecosystem. The issue involves nokogiri vulnerable to libxml xml entity expansion. Remediation is available by upgrading affected packages to version 1.6.6.4.

CVE-2015-1819 at a Glance

CVE Identifier CVE-2015-1819
GHSA Identifier GHSA-q7wx-62r7-j2x7
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-776: Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion')
Affected Product Nokogiri
Package Ecosystem RubyGems
Published Date
Last Updated

How to Fix CVE-2015-1819

To remediate this vulnerability, upgrade all affected Nokogiri dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

nokogiri fixed: 1.6.6.4
Upgrade nokogiri to 1.6.6.4
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for nokogiri

How to Check if You Are Affected

To determine whether your application is affected by CVE-2015-1819, inspect your project dependencies for Nokogiri:

inspect dependencies for nokogiri

Analyze the terminal output to locate any version of Nokogiri in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.6.6.4), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-776: Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion'), where 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. In Nokogiri, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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.

CVE-2015-1819 Affected Nokogiri Versions

1 component(s)
Fixed Versions:
1.6.6.4
Product / Package Ecosystem Affected Versions Fixed Version
nokogiri
RubyGems
≥ 1.6.6.0
< 1.6.6.4
1.6.6.4

References

NVD — CVE-2015-1819 NVD
https://nvd.nist.gov/vuln/detail/CVE-2015-1819
Nokogiri Source Repository REPOSITORY
https://github.com/sparklemotion/nokogiri/issues/1374
git.gnome.org/browse/libxml2/comm... WEB
https://git.gnome.org/browse/libxml2/commit/?id=213f1fe0d76d30eaed6e5853057defc43e6df2c9
Nokogiri Source Repository REPOSITORY
https://github.com/rubysec/ruby-advisory-db/blob/master/gems/nokogiri/CVE-2015-1819.yml
Nokogiri Security Information SECURITY
https://security.gentoo.org/glsa/201507-08
Nokogiri Security Information SECURITY
https://security.gentoo.org/glsa/201701-37
support.apple.com/ht206166 WEB
https://support.apple.com/HT206166
support.apple.com/ht206167 WEB
https://support.apple.com/HT206167
support.apple.com/ht206168 WEB
https://support.apple.com/HT206168
support.apple.com/ht206169 WEB
https://support.apple.com/HT206169
Nokogiri Security Information SECURITY
http://lists.apple.com/archives/security-announce/2016/Mar/msg00000.html
Nokogiri Security Information SECURITY
http://lists.apple.com/archives/security-announce/2016/Mar/msg00001.html
Nokogiri Security Information SECURITY
http://lists.apple.com/archives/security-announce/2016/Mar/msg00002.html
Nokogiri Security Information SECURITY
http://lists.apple.com/archives/security-announce/2016/Mar/msg00004.html
lists.fedoraproject.org/pipermail/package-a... WEB
http://lists.fedoraproject.org/pipermail/package-announce/2015-November/172710.html
lists.fedoraproject.org/pipermail/package-a... WEB
http://lists.fedoraproject.org/pipermail/package-announce/2015-November/172943.html
lists.opensuse.org/opensuse-updates/20... WEB
http://lists.opensuse.org/opensuse-updates/2015-12/msg00120.html
lists.opensuse.org/opensuse-updates/20... WEB
http://lists.opensuse.org/opensuse-updates/2016-01/msg00031.html
rhn.redhat.com/errata/rhsa-2015-14... WEB
http://rhn.redhat.com/errata/RHSA-2015-1419.html
rhn.redhat.com/errata/rhsa-2015-25... WEB
http://rhn.redhat.com/errata/RHSA-2015-2550.html
Nokogiri Security Information SECURITY
http://www.debian.org/security/2015/dsa-3430
Nokogiri Security Information SECURITY
http://www.oracle.com/technetwork/topics/security/bulletinoct2015-2511968.html
Nokogiri Security Information SECURITY
http://www.oracle.com/technetwork/topics/security/linuxbulletinoct2015-2719645.html
www.ubuntu.com/usn/usn-2812-1 WEB
http://www.ubuntu.com/usn/USN-2812-1
xmlsoft.org/news.html WEB
http://xmlsoft.org/news.html

Frequently Asked Questions

What is CVE-2015-1819?
CVE-2015-1819 is a security vulnerability in Nokogiri involving Nokogiri vulnerable to libxml XML Entity Expansion under CWE-776: Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion').
Which Nokogiri versions are affected?
Affected versions include releases prior to 1.6.6.4 across affected packages: nokogiri.
What version fixes CVE-2015-1819?
Upgrading to 1.6.6.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is nokogiri affected?
Yes, nokogiri is affected in releases prior to 1.6.6.4. Upgrade your dependency to 1.6.6.4 or later.
What CWE is associated with CVE-2015-1819?
CVE-2015-1819 is classified under 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 can I check RubyGems dependencies for CVE-2015-1819?
Run the dependency tree command: 'inspect dependencies for nokogiri'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-q7wx-62r7-j2x7",
  "modified" : "2023-03-14T19:07:20Z",
  "published" : "2018-08-08T22:31:12Z",
  "aliases" : [ "CVE-2015-1819" ],
  "summary" : "Nokogiri vulnerable to libxml XML Entity Expansion",
  "details" : "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.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "nokogiri"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.6.6.0"
      }, {
        "fixed" : "1.6.6.4"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 1.6.6.3"
    }
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2015-1819"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/sparklemotion/nokogiri/issues/1374"
  }, {
    "type" : "WEB",
    "url" : "https://git.gnome.org/browse/libxml2/commit/?id=213f1fe0d76d30eaed6e5853057defc43e6df2c9"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/nokogiri/CVE-2015-1819.yml"
  }, {
    "type" : "WEB",
    "url" : "https://security.gentoo.org/glsa/201507-08"
  }, {
    "type" : "WEB",
    "url" : "https://security.gentoo.org/glsa/201701-37"
  }, {
    "type" : "WEB",
    "url" : "https://support.apple.com/HT206166"
  }, {
    "type" : "WEB",
    "url" : "https://support.apple.com/HT206167"
  }, {
    "type" : "WEB",
    "url" : "https://support.apple.com/HT206168"
  }, {
    "type" : "WEB",
    "url" : "https://support.apple.com/HT206169"
  }, {
    "type" : "WEB",
    "url" : "http://lists.apple.com/archives/security-announce/2016/Mar/msg00000.html"
  }, {
    "type" : "WEB",
    "url" : "http://lists.apple.com/archives/security-announce/2016/Mar/msg00001.html"
  }, {
    "type" : "WEB",
    "url" : "http://lists.apple.com/archives/security-announce/2016/Mar/msg00002.html"
  }, {
    "type" : "WEB",
    "url" : "http://lists.apple.com/archives/security-announce/2016/Mar/msg00004.html"
  }, {
    "type" : "WEB",
    "url" : "http://lists.fedoraproject.org/pipermail/package-announce/2015-November/172710.html"
  }, {
    "type" : "WEB",
    "url" : "http://lists.fedoraproject.org/pipermail/package-announce/2015-November/172943.html"
  }, {
    "type" : "WEB",
    "url" : "http://lists.opensuse.org/opensuse-updates/2015-12/msg00120.html"
  }, {
    "type" : "WEB",
    "url" : "http://lists.opensuse.org/opensuse-updates/2016-01/msg00031.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2015-1419.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2015-2550.html"
  }, {
    "type" : "WEB",
    "url" : "http://www.debian.org/security/2015/dsa-3430"
  }, {
    "type" : "WEB",
    "url" : "http://www.oracle.com/technetwork/topics/security/bulletinoct2015-2511968.html"
  }, {
    "type" : "WEB",
    "url" : "http://www.oracle.com/technetwork/topics/security/linuxbulletinoct2015-2719645.html"
  }, {
    "type" : "WEB",
    "url" : "http://www.ubuntu.com/usn/USN-2812-1"
  }, {
    "type" : "WEB",
    "url" : "http://xmlsoft.org/news.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-776" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-16T21:51:25Z",
    "nvd_published_at" : null
  }
}