CVE-2019-5477
A command injection vulnerability in Nokogiri v1.10.3 and earlier allows commands to be executed in a subprocess via Ruby's `Kernel.open`…
- Published
- Updated
- Reserved
- Assigned by
- hackerone
Description
A command injection vulnerability in Nokogiri v1.10.3 and earlier allows commands to be executed in a subprocess via Ruby's `Kernel.open` method. Processes are vulnerable only if the undocumented method `Nokogiri::CSS::Tokenizer#load_file` is being called with unsafe user input as the filename. This vulnerability appears in code generated by the Rexical gem versions v1.0.6 and earlier. Rexical is used by Nokogiri to generate lexical scanner code for parsing CSS queries. The underlying vulnerability was addressed in Rexical v1.0.7 and Nokogiri upgraded to this version of Rexical in Nokogiri v1.10.4.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| NVDNVD · Modified | 3.1 | Critical9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
- EPSS (exploitation in 30 days)
- 5.9% · top 6.8% of all CVEs (3 Nov 2026)
The list uses the assigner's score when there is one, then CISA's, then NVD's: Critical 9.8.
Weakness
Affected products
Nokogiri (ruby gem)
- affected Fixed in v1.10.4
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- RubyGemsnokogiriGHSA-cr5j-953j-xw5p (opens in a new tab)
- RubyGemsrexicalGHSA-cr5j-953j-xw5p (opens in a new tab)
References (8)
- https://hackerone.com/reports/650835 (opens in a new tab)x_transferred
- https://github.com/tenderlove/rexical/blob/master/CHANGELOG.rdoc (opens in a new tab)x_transferred
- https://github.com/sparklemotion/nokogiri/issues/1915 (opens in a new tab)x_transferred
- [debian-lts-announce] 20190926 [SECURITY] [DLA 1933-1] ruby-nokogiri security update (opens in a new tab)mailing-listx_transferred
- USN-4175-1 (opens in a new tab)vendor-advisoryx_transferred
- GLSA-202006-05 (opens in a new tab)vendor-advisoryx_transferred
- [debian-lts-announce] 20221012 [SECURITY] [DLA 3149-1] ruby-nokogiri security update (opens in a new tab)mailing-listx_transferred
- [debian-lts-announce] 20221012 [SECURITY] [DLA 3150-1] rexical security update (opens in a new tab)mailing-listx_transferred
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-cr5j-953j-xw5p (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://trackcve.app/cve/CVE-2019-5477)Record last updated .