CVE-2019-5477: Command Injection

Published Aug 16, 2019
·
Updated

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#loadfile 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 Software

26 affected componentsFixes available
rubygems/rexical<1.0.7
1.0.7
rubygems/nokogiri<1.10.4
1.10.4
Nokogiri Nokogiri<=1.10.3
Canonical Ubuntu Linux=16.04
Canonical Ubuntu Linux=18.04
Canonical Ubuntu Linux=19.04
Canonical Ubuntu Linux=19.10
Debian Debian Linux=8.0
Debian Debian Linux=10.0
debian/rexical
1.0.7-11.0.7-21.0.8-1
debian/ruby-nokogiri
1.11.1+dfsg-21.11.1+dfsg-2+deb11u11.13.10+dfsg-21.18.2+dfsg-11.18.10+dfsg-3
alpine/ruby-nokogiri<1.10.4-r0
1.10.4-r0
alpine/ruby-nokogiri<1.10.4-r0
1.10.4-r0
alpine/ruby-nokogiri<1.10.4-r0
1.10.4-r0
alpine/ruby-nokogiri<1.10.4-r0
1.10.4-r0
alpine/ruby-nokogiri<1.10.4-r0
1.10.4-r0
alpine/ruby-nokogiri<1.10.4-r0
1.10.4-r0
alpine/ruby-nokogiri<1.10.4-r0
1.10.4-r0
alpine/ruby-nokogiri<1.10.4-r0
1.10.4-r0
alpine/ruby-nokogiri<1.10.4-r0
1.10.4-r0
alpine/ruby-nokogiri<1.10.4-r0
1.10.4-r0
alpine/ruby-nokogiri<1.10.4-r0
1.10.4-r0
alpine/ruby-nokogiri<1.10.4-r0
1.10.4-r0
alpine/ruby-nokogiri<1.10.4-r0
1.10.4-r0
alpine/ruby-nokogiri<1.10.4-r0
1.10.4-r0
alpine/ruby-nokogiri<1.10.4-r0
1.10.4-r0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade rubygems/rexical to a version that resolves this vulnerability.

    Fixed in 1.0.7
  2. Upgrade

    Upgrade rubygems/nokogiri to a version that resolves this vulnerability.

    Fixed in 1.10.4
  3. Upgrade

    Upgrade debian/rexical to a version that resolves this vulnerability.

    Fixed in 1.0.7-1Fixed in 1.0.7-2Fixed in 1.0.8-1
  4. Upgrade

    Upgrade debian/ruby-nokogiri to a version that resolves this vulnerability.

    Fixed in 1.11.1+dfsg-2Fixed in 1.11.1+dfsg-2+deb11u1Fixed in 1.13.10+dfsg-2Fixed in 1.18.2+dfsg-1Fixed in 1.18.10+dfsg-3
  5. Upgrade

    Upgrade alpine/ruby-nokogiri to a version that resolves this vulnerability.

    Fixed in 1.10.4-r0
  6. Upgrade

    Upgrade Nokogiri to a version that resolves this vulnerability.

    Fixed in 1.10.4
  7. Upgrade

    Upgrade Rexical to a version that resolves this vulnerability.

    Fixed in 1.0.7

Event History

Aug 16, 2019
CVE Published
via MITRE·12:00 AM
Data Sourced
via MITRE·12:00 AM
DescriptionWeakness
Data Sourced
via NVD·04:15 PM
RemedyDescriptionSeverityWeaknessAffected Software
Data Sourced
via OSV·04:15 PM
DescriptionSeverityAffected Software
Aug 19, 2019
Advisory Published
07:27 PM

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203