# CVE-2019-5477: ruby-nokogiri: A command injection vulnerability in Nokogiri v1.10.3 and earlier allows commands to be executed in a subprocess via...

CVE-2019-5477 is fixed in ruby-nokogiri on 1 platform by ruby-nokogiri 1.8.2-1ubuntu0.1 (version 1.8.2-1ubuntu0.1), released August 16, 2019. It is not reported as exploited. Patch Radar priority: Routine.

- Web page: https://patchblox.com/security/cve/CVE-2019-5477
- Priority: Routine
- CVSS: n/a (Medium)
- EPSS: 0.0590
- CISA KEV: not listed
- Exploited (vendor report): no
- Publicly disclosed: no
- Published: Aug 16, 2019

## 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.

## Where it's fixed

| Platform | Product | Fixed in | Fix | Released |
|---|---|---|---|---|
| Linux | ruby-nokogiri Ubuntu 18.04.6 LTS (bionic) | 1.8.2-1ubuntu0.1 | [ruby-nokogiri 1.8.2-1ubuntu0.1](https://patchblox.com/security/data/fix/linux/ubuntu-bionic-ruby-nokogiri-1.8.2-1ubuntu0.1.md) | Aug 16, 2019 |

---

Data as of 2026-11-12T01:51:14Z UTC. Source: Patchblox Patch Radar (https://patchblox.com/security/patch-radar). Patchblox finds out-of-date software on Windows, macOS and Linux and updates it through release rings: https://patchblox.com/demo

Free to use with attribution: show "Data: Patchblox Patch Radar" with a link to https://patchblox.com/security/patch-radar. Terms, including what needs a written agreement: https://patchblox.com/security/patch-radar/use-the-data

Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.
