{"id":"CVE-2019-5477","published":"2019-08-16T00:00:00Z","modified":"2024-08-04T19:54:53Z","title":"A command injection vulnerability in Nokogiri v1.10.3 and earlier allows commands to be executed in a subprocess via…","vendor":null,"product":null,"tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":null,"epss":{"score":0.06137,"percentile":0.93623,"provenance":"source"},"cwes":[{"id":"CWE-78","name":"Improper Neutralization of Special Elements used in an OS Command"}],"references":[{"url":"https://hackerone.com/reports/650835","tags":[]},{"url":"https://github.com/tenderlove/rexical/blob/master/CHANGELOG.rdoc","tags":[]},{"url":"https://github.com/sparklemotion/nokogiri/issues/1915","tags":[]},{"url":"https://lists.debian.org/debian-lts-announce/2019/09/msg00027.html","tags":["mailing-list"]},{"url":"https://usn.ubuntu.com/4175-1/","tags":["vendor-advisory"]},{"url":"https://security.gentoo.org/glsa/202006-05","tags":["vendor-advisory"]},{"url":"https://lists.debian.org/debian-lts-announce/2022/10/msg00018.html","tags":["mailing-list"]},{"url":"https://lists.debian.org/debian-lts-announce/2022/10/msg00019.html","tags":["mailing-list"]}],"priority":{"score":18.7,"factors":[{"name":"EPSS percentile","points":18.72}]},"affectedVersions":[{"vendor":"n/a","product":"Nokogiri (ruby gem)","versions":["Fixed in v1.10.4"]}],"affected":[{"ecosystem":"RubyGems","package":"nokogiri","vulnerableRanges":["<1.10.4"],"patched":["1.10.4"],"from":["GHSA-cr5j-953j-xw5p"],"provenance":"source"},{"ecosystem":"RubyGems","package":"rexical","vulnerableRanges":["<1.0.7"],"patched":["1.0.7"],"from":["GHSA-cr5j-953j-xw5p"],"provenance":"source"}],"summary":{"text":"The flaw is a command injection vulnerability in Nokogiri v1.10.3 and earlier, specifically in the lexical scanner code generated by the Rexical gem (v1.0.6 and earlier) that Nokogiri uses to parse CSS queries. An attacker can execute commands in a subprocess via Ruby's Kernel.open method, but only where the undocumented Nokogiri::CSS::Tokenizer#load_file method is called with unsafe user input as the filename.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:06:24Z"},"euvd":{"id":"EUVD-2019-0629","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2018-8048","published":"2018-03-27","fixed":"1.8.3","kev":false},{"cve":"CVE-2018-14404","published":"2018-07-19","fixed":"1.8.5","kev":false},{"cve":"CVE-2019-11068","published":"2019-04-10","fixed":"1.10.3","kev":false,"link":{"from":"CVE-2019-11068","to":"CVE-2019-5477","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"RubyGems:nokogiri","fromFixed":"1.10.3","toFixed":"1.10.4","daysApart":128}]}},{"cve":"CVE-2019-5477","published":"2019-08-16","fixed":"1.10.4","kev":false},{"cve":"CVE-2019-13117","published":"2019-07-01","fixed":"1.10.5","kev":false},{"cve":"CVE-2019-13118","published":"2019-07-01","fixed":"1.10.5","kev":false},{"cve":"CVE-2019-18197","published":"2019-10-18","fixed":"1.10.5","kev":false}],"package":"RubyGems:nokogiri"}}