Vulnerabilities / CVE-2019-5477

critical

CVE-2019-5477

A command injection vulnerability in Nokogiri v1.10.3 and earlier allo ...

Published Modified CWE 78
In the Trivy database since at least 24 Oct 2026, 07:11 UTCWhen it arrived before that build is not recorded.

Severity by source

NVD9.8CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
GHSA9.8CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Trivy's own label is CRITICAL. Rated critical by NVD, GHSA, Photon OS, Ruby Advisory DB. Rated lower by Ubuntu (medium).

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.

Affected packages and fixed versions

SourcePackageFixed in
Photon OS 2.0rubygem-nokogiri1.12.5-1.ph2
rubygems::GitHub Security Advisory RubyGemsnokogiri, rexical1.10.4 and 1 more
rubygems::Ruby Advisory Databasenokogiri, rexical>= 1.10.4 and 1 more
alpine 3.10ruby-nokogiri1.10.4-r0
alpine 3.11ruby-nokogiri1.10.4-r0
alpine 3.12ruby-nokogiri1.10.4-r0
alpine 3.13ruby-nokogiri1.10.4-r0
alpine 3.14ruby-nokogiri1.10.4-r0
alpine 3.15ruby-nokogiri1.10.4-r0
alpine 3.16ruby-nokogiri1.10.4-r0
alpine 3.17ruby-nokogiri1.10.4-r0
alpine 3.18ruby-nokogiri1.10.4-r0
Show all 43 entries from 34 sources
SourcePackageFixed in
Photon OS 2.0rubygem-nokogiri1.12.5-1.ph2
rubygems::GitHub Security Advisory RubyGemsnokogiri1.10.4
rubygems::GitHub Security Advisory RubyGemsrexical1.0.7
rubygems::Ruby Advisory Databasenokogiri>= 1.10.4
rubygems::Ruby Advisory Databaserexical>= 1.0.7
alpine 3.10ruby-nokogiri1.10.4-r0
alpine 3.11ruby-nokogiri1.10.4-r0
alpine 3.12ruby-nokogiri1.10.4-r0
alpine 3.13ruby-nokogiri1.10.4-r0
alpine 3.14ruby-nokogiri1.10.4-r0
alpine 3.15ruby-nokogiri1.10.4-r0
alpine 3.16ruby-nokogiri1.10.4-r0
alpine 3.17ruby-nokogiri1.10.4-r0
alpine 3.18ruby-nokogiri1.10.4-r0
alpine 3.19ruby-nokogiri1.10.4-r0
alpine 3.20ruby-nokogiri1.10.4-r0
alpine 3.21ruby-nokogiri1.10.4-r0
alpine 3.22ruby-nokogiri1.10.4-r0
alpine 3.23ruby-nokogiri1.10.4-r0
alpine 3.24ruby-nokogiri1.10.4-r0
alpine edgeruby-nokogiri1.10.4-r0
debian 10rexical1.0.5-2+deb10u1
debian 10ruby-nokogiri1.10.0+dfsg1-2+deb10u1
debian 11rexical1.0.7-1
debian 11ruby-nokogiri1.10.4+dfsg1-1
debian 12rexical1.0.7-1
debian 12ruby-nokogiri1.10.4+dfsg1-1
debian 13rexical1.0.7-1
debian 13ruby-nokogiri1.10.4+dfsg1-1
debian 14rexical1.0.7-1
debian 14ruby-nokogiri1.10.4+dfsg1-1
debian 8ruby-nokogiri1.6.3.1+ds-1+deb8u1
debian 9rexicalno fix listed
debian 9ruby-nokogirino fix listed
echorexical1.0.7-1
echoruby-nokogiri1.10.4+dfsg1-1
ubuntu 14.04-ESMruby-nokogiri1.6.1+ds-1ubuntu0.1~esm1
ubuntu 16.04ruby-nokogiri1.6.7.2-3ubuntu0.1
ubuntu 16.04-ESMruby-nokogiri1.6.7.2-3ubuntu0.1
ubuntu 18.04ruby-nokogiri1.8.2-1ubuntu0.1
ubuntu 18.04-ESMruby-nokogiri1.8.2-1ubuntu0.1
ubuntu 19.04ruby-nokogiri1.10.0+dfsg1-2ubuntu0.1
ubuntu 19.10ruby-nokogiri1.10.3+dfsg1-2ubuntu0.1

References

All 19 references

Vulnerability data compiled from the Trivy vulnerability database (trivy-db, Aqua Security, Apache License 2.0), which aggregates third-party advisories. CVE records are published by The MITRE Corporation under the CVE Terms of Use; CVE is a trademark of MITRE. This product uses data from the NVD API but is not endorsed or certified by the NVD. Severity, titles and advisory data from the GitHub Advisory Database (CC BY 4.0), Red Hat security data (CC BY 4.0) and the other sources linked on each entry. Entries may be summarised or re-formatted; the linked original is the authoritative record.