CVE-2015-7499: Nokogiri Heap-based Buffer Overflow Vulnerability
MODERATECVE-2015-7499 is a MODERATE heap-based buffer overflow vulnerability (CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer) affecting Nokogiri libraries in the RubyGems ecosystem. The issue involves heap-based buffer overflow in nokogiri. Remediation is available by upgrading affected packages to version 1.6.7.2.
CVE-2015-7499 at a Glance
How to Fix CVE-2015-7499
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.
Upgrade nokogiri to 1.6.7.2
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-7499, 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.7.2), 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-119: Improper Restriction of Operations within the Bounds of a Memory Buffer, where the product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. this may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program data. 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
CVE-2015-7499 Affected Nokogiri Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
nokogiri
|
RubyGems |
≥ 1.6.0
< 1.6.7.2
|
1.6.7.2
|
References
Frequently Asked Questions
What is CVE-2015-7499?
Which Nokogiri versions are affected?
What version fixes CVE-2015-7499?
Is nokogiri affected?
What CWE is associated with CVE-2015-7499?
How can I check RubyGems dependencies for CVE-2015-7499?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-jxjr-5h69-qw3w",
"modified" : "2023-07-05T17:45:36Z",
"published" : "2018-09-17T21:57:38Z",
"aliases" : [ "CVE-2015-7499" ],
"summary" : "Heap-based buffer overflow in nokogiri",
"details" : "Heap-based buffer overflow in the xmlGROW function in parser.c in libxml2 before 2.9.3. A remote attacker could provide a specially crafted XML or HTML file that, when processed by an application using libxml2, would cause that application to use an excessive amount of CPU, leak potentially sensitive information, or crash the application.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "RubyGems",
"name" : "nokogiri"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.6.0"
}, {
"fixed" : "1.6.7.2"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 1.6.7.1"
}
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2015-7499"
}, {
"type" : "WEB",
"url" : "https://bugzilla.redhat.com/show_bug.cgi?id=1281925"
}, {
"type" : "WEB",
"url" : "https://git.gnome.org/browse/libxml2/commit/?id=28cd9cb747a94483f4aea7f0968d202c20bb4cfc"
}, {
"type" : "WEB",
"url" : "https://git.gnome.org/browse/libxml2/commit/?id=35bcb1d758ed70aa7b257c9c3b3ff55e54e3d0da"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-jxjr-5h69-qw3w"
}, {
"type" : "WEB",
"url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/nokogiri/CVE-2015-7499.yml"
}, {
"type" : "WEB",
"url" : "https://groups.google.com/forum/#!topic/ruby-security-ann/Dy7YiKb_pMM"
}, {
"type" : "WEB",
"url" : "https://security.gentoo.org/glsa/201701-37"
}, {
"type" : "WEB",
"url" : "https://web.archive.org/web/20210724022841/http://www.securityfocus.com/bid/79509"
}, {
"type" : "WEB",
"url" : "https://web.archive.org/web/20211205133229/https://securitytracker.com/id/1034243"
}, {
"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-2549.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.ubuntu.com/usn/USN-2834-1"
}, {
"type" : "WEB",
"url" : "http://xmlsoft.org/news.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-119" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2020-06-16T21:44:24Z",
"nvd_published_at" : "2015-12-15T21:59:00Z"
}
}