CVE-2017-5029: Nokogiri Nokogiri Implementation Of Libxslt Lacks Vulnerability
HIGHCVE-2017-5029 is a HIGH (CVSS 8.8) nokogiri implementation of libxslt lacks vulnerability (CWE-787: Out-of-bounds Write) affecting Nokogiri libraries in the RubyGems ecosystem. The issue involves nokogiri implementation of libxslt lacks integer overflow checks. Remediation is available by upgrading affected packages to version 1.7.2.
CVE-2017-5029 at a Glance
Security Impact
CVSS: 8.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H).
How to Fix CVE-2017-5029
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.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-2017-5029, 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.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-787: Out-of-bounds Write, where the product writes data past the end, or before the beginning, of the intended buffer. 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-2017-5029 Affected Nokogiri Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
nokogiri
|
RubyGems |
< 1.7.2
|
1.7.2
|
References
Frequently Asked Questions
What is CVE-2017-5029?
Which Nokogiri versions are affected?
What version fixes CVE-2017-5029?
Is nokogiri affected?
What is the CVSS score of CVE-2017-5029?
What CWE is associated with CVE-2017-5029?
How can I check RubyGems dependencies for CVE-2017-5029?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-pf6m-fxpq-fg8v",
"modified" : "2023-07-03T23:57:14Z",
"published" : "2018-07-31T18:21:29Z",
"aliases" : [ "CVE-2017-5029" ],
"summary" : "Nokogiri implementation of libxslt lacks integer overflow checks",
"details" : "The xsltAddTextString function in transform.c in libxslt 1.1.29, as used in Nokogiri prior to 1.7.2, lacked a check for integer overflow during a size calculation, which allowed a remote attacker to perform an out of bounds memory write via a crafted HTML page.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "RubyGems",
"name" : "nokogiri"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.7.2"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2017-5029"
}, {
"type" : "WEB",
"url" : "https://github.com/sparklemotion/nokogiri/issues/1634"
}, {
"type" : "WEB",
"url" : "https://git.gnome.org/browse/libxslt/commit/?id=08ab2774b870de1c7b5a48693df75e8154addae5"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-pf6m-fxpq-fg8v"
}, {
"type" : "WEB",
"url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/nokogiri/CVE-2017-5029.yml"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/sparklemotion/nokogiri"
}, {
"type" : "WEB",
"url" : "https://ubuntu.com/security/CVE-2017-5029"
}, {
"type" : "WEB",
"url" : "https://ubuntu.com/security/notices/USN-3271-1"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-787" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2020-06-16T21:48:58Z",
"nvd_published_at" : "2017-04-24T23:59:00Z"
}
}