CVE-2019-5477: Nokogiri Command Injection Vulnerability
9.8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.77529%
CWE
Published
8/19/2019
Updated
8/28/2023
KEV Status
No
Technology
Ruby
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
nokogiri | rubygems | < 1.10.4 | 1.10.4 |
rexical | rubygems | < 1.0.7 | 1.0.7 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability description explicitly identifies Nokogiri::CSS::Tokenizer#load_file
as the entry point when processing untrusted filenames. The commit diff shows this method originally used Kernel.open(filename)
, which executes shell commands when given pipe operators. The patch changes this to File.open(filename)
, which is safe. The Rexical-generated
code (tokenizer.rex
) produced this vulnerable implementation, but the direct vulnerable function in Nokogiri
is clearly identified in the Tokenizer
class.