CVEfocus › CVE database › CVE-2019-5477

CVE-2019-5477

CVSS 9.8 CriticalEPSS 6.1% (higher than 94% of CVEs)Published 2019-08-16Updated 2024-08-04Assigner: hackerone

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.

CWE-78

What to do

Fixed builds are available from Alpine, Debian, RubyGems, Ubuntu: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

25Fixed
1Fix pending

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 18.04ruby-nokogiriFixed1.8.2-1ubuntu0.1UBUNTU-CVE-2019-5477
Ubuntu 16.04ruby-nokogiriFixed1.6.7.2-3ubuntu0.1UBUNTU-CVE-2019-5477
Ubuntu 14.04ruby-nokogiriFix pending1.6.1+ds-1ubuntu0.1~esm1 (Ubuntu Pro)UBUNTU-CVE-2019-5477
Debian 14rexicalFixed1.0.7-1DEBIAN-CVE-2019-5477
Debian 14ruby-nokogiriFixed1.10.4+dfsg1-1DEBIAN-CVE-2019-5477
Debian 13rexicalFixed1.0.7-1DEBIAN-CVE-2019-5477
Debian 13ruby-nokogiriFixed1.10.4+dfsg1-1DEBIAN-CVE-2019-5477
Debian 12rexicalFixed1.0.7-1DEBIAN-CVE-2019-5477
Debian 12ruby-nokogiriFixed1.10.4+dfsg1-1DEBIAN-CVE-2019-5477
Alpine Linux 3.24ruby-nokogiriFixed1.10.4-r0ALPINE-CVE-2019-5477
Alpine Linux 3.23ruby-nokogiriFixed1.10.4-r0ALPINE-CVE-2019-5477
Alpine Linux 3.22ruby-nokogiriFixed1.10.4-r0ALPINE-CVE-2019-5477
Alpine Linux 3.21ruby-nokogiriFixed1.10.4-r0ALPINE-CVE-2019-5477
Alpine Linux 3.20ruby-nokogiriFixed1.10.4-r0ALPINE-CVE-2019-5477
Alpine Linux 3.19ruby-nokogiriFixed1.10.4-r0ALPINE-CVE-2019-5477
Alpine Linux 3.18ruby-nokogiriFixed1.10.4-r0ALPINE-CVE-2019-5477
Alpine Linux 3.17ruby-nokogiriFixed1.10.4-r0ALPINE-CVE-2019-5477
Alpine Linux 3.16ruby-nokogiriFixed1.10.4-r0ALPINE-CVE-2019-5477
Alpine Linux 3.15ruby-nokogiriFixed1.10.4-r0ALPINE-CVE-2019-5477
Alpine Linux 3.14ruby-nokogiriFixed1.10.4-r0ALPINE-CVE-2019-5477
Alpine Linux 3.13ruby-nokogiriFixed1.10.4-r0ALPINE-CVE-2019-5477
Alpine Linux 3.12ruby-nokogiriFixed1.10.4-r0ALPINE-CVE-2019-5477
Alpine Linux 3.11ruby-nokogiriFixed1.10.4-r0ALPINE-CVE-2019-5477
Alpine Linux 3.10ruby-nokogiriFixed1.10.4-r0ALPINE-CVE-2019-5477
RubyGems librarynokogiriFixed1.10.4GHSA-cr5j-953j-xw5p
RubyGems libraryrexicalFixed1.0.7GHSA-cr5j-953j-xw5p

What the vendor says

As published in the CVE record by hackerone, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.