CVE-2017-15412 — nokogiri
HIGHCVE-2017-15412 is a high-severity (CVSS 8.8) Use After Free vulnerability in nokogiri. 2 public exploit or proof-of-concept references are indexed, so weaponization risk is real. A fix is available for nokogiri — see the affected versions and patch details below.
Nokogiri gem, via libxml, is affected by DoS vulnerabilities
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
nokogiriReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects RubyGems packages — download data is not available via public APIs for these ecosystems.
Description
Use after free in libxml2 before 2.9.5, as used in Google Chrome prior to 63.0.3239.84 and other products, allowed a remote attacker to potentially exploit heap corruption via a crafted HTML page.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 💎RubyGems | nokogiri | all versions | 1.8.2bundle update nokogiri --conservative |
Affected Products
debian linuxdebianchromegoogleenterprise linux desktopredhatenterprise linux serverredhatenterprise linux workstationredhatlibxml2xmlsoftResearch use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for nokogiri, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update nokogiri to 1.8.2 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2017-15412 is resolved across your whole dependency graph.
Workarounds
Stop feeding it untrusted input: reject or quarantine files and payloads from unverified sources until you can upgrade, restrict accepted formats to the ones you actually need, and run the parsing or decoding step in a least-privileged sandbox or short-lived worker so a crash or corrupted read cannot reach the rest of the process.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat Ansible Tower 3.5 for RHEL 7 | ansible-tower-35/ansible-tower:3.5.6-1 | RHBA-2020:1539 |
| Red Hat Ansible Tower 3.6 for RHEL 7 | ansible-tower-36/ansible-tower:3.6.4-1 | RHBA-2020:1540 |
| Red Hat Enterprise Linux 6 Supplementary | chromium-browser-0:63.0.3239.84-1.el6_9 | RHSA-2017:3401 |
| Red Hat Enterprise Linux 7 | libxml2-0:2.9.1-6.el7.4 | RHSA-2020:1190 |
| Red Hat JBoss Core Services | libxml2 | RHSA-2018:0287 |
Frequently Asked Questions
Is CVE-2017-15412 in your dependencies?
Find it across RubyGems, including transitive dependencies.