Nokogiri: Command injection — GLSA 202006-05

Nokogiri has a vulnerability allowing arbitrary execution of code if a certain function is used.

Affected packages

dev-ruby/nokogiri on all architectures
Affected versions < 1.10.4
Unaffected versions >= 1.10.4

Background

Nokogiri is an HTML, XML, SAX, and Reader parser.

Description

A command injection vulnerability in Nokogiri allows commands to be executed in a subprocess by Ruby’s Kernel.open method. Processes are vulnerable only if the undocumented method Nokogiri::CSS::Tokenizer#load_file is being passed untrusted user input.

Impact

A remote attacker could possibly execute arbitrary code with the privileges of the process.

Workaround

Avoid calling the undocumented method Nokogiri::CSS::Tokenizer#load_file with untrusted user input.

Resolution

All Nokogiri users should upgrade to the latest version:

 # emerge --sync
 # emerge --ask --oneshot --verbose ">=dev-ruby/nokogiri-1.10.4"
 

References

Release date
June 13, 2020

Latest revision
June 13, 2020: 1

Severity
normal

Exploitable
remote

Bugzilla entries