Advisory

GHSA-cr5j-953j-xw5p

Also known as: CVE-2019-5477

Summary

Nokogiri Command Injection Vulnerability

Details

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.

Severity

Critical Basis: The source's own band: CRITICAL

Dates

Published
2019-08-19 19:27 UTC
Modified
2024-02-18 05:31 UTC

Affected packages and fixes

nokogiri

RubyGems · All systems

Affected

  • introduced 0, fixed 1.10.4 (ecosystem)

Fixed versions

1.10.4

Fix

The export has no generic command for this ecosystem.

rexical

RubyGems · All systems

Affected

  • introduced 0, fixed 1.0.7 (ecosystem)

Fixed versions

1.0.7

Fix

The export has no generic command for this ecosystem.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences