cve.bz

CVE-2019-5477 OS Command Injection

9.8 criticalEPSS 6.1%Fix available

Critical (9.8). EPSS 6.1% estimated probability of exploitation activity in the next 30 days. Fixed in nokogiri 1.10.4.

On this page
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

CVSS 3.1

9.8 critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
6.1% (unchanged from 5.9% a week ago; 5.9% 30 days ago) estimated probability of exploitation activity in the next 30 days; 94th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CWE
CWE-78 Improper Neutralization of Special Elements used in an OS Command (OS Command Injection)
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2019-5477 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2019-5477?via=ask-ai-copy and https://cve.bz/cve/CVE-2019-5477?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2019-5477 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
nokogiri:nokogirithrough 1.10.3
canonical:ubuntu_linux16.04
canonical:ubuntu_linux18.04
canonical:ubuntu_linux19.04
canonical:ubuntu_linux19.10
debian:debian_linux8.0
debian:debian_linux10.0

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-cr5j-953j-xw5pRubyGemsnokogiri<1.10.41.10.4
GHSA-cr5j-953j-xw5pRubyGemsrexical<1.0.71.0.7

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian8ruby-nokogiri1.6.3.1+ds-1+deb8u1DLA-1933-1
Debian10rexical1.0.5-2+deb10u1DLA-3150-1
Debian10ruby-nokogiri1.10.0+dfsg1-2+deb10u1DLA-3149-1
Debian12, 13, 14rexical1.0.7-1DEBIAN-CVE-2019-5477
Debian12, 13, 14ruby-nokogiri1.10.4+dfsg1-1DEBIAN-CVE-2019-5477
Ubuntu16.04:LTSruby-nokogiri1.6.7.2-3ubuntu0.1UBUNTU-CVE-2019-5477 USN-4175-1
Ubuntu18.04:LTSruby-nokogiri1.8.2-1ubuntu0.1UBUNTU-CVE-2019-5477 USN-4175-1
UbuntuPro:14.04:LTSruby-nokogiri1.6.1+ds-1ubuntu0.1~esm1UBUNTU-CVE-2019-5477
SUSEEnterprise Storage 4, OpenStack Cloud 7crowbar-core4.0+git.1570463621.40b11cd48-9.54.1SUSE-SU-2019:2671-1
SUSEEnterprise Storage 4, OpenStack Cloud 7rubygem-chef10.32.2-5.12.1SUSE-SU-2019:2671-1
SUSEEnterprise Storage 4, OpenStack Cloud 7rubygem-easy_diff1.0.0-3.3.1SUSE-SU-2019:2671-1
SUSEEnterprise Storage 4, OpenStack Cloud 7sleshammer0.7.0-0.18.12.3SUSE-SU-2019:2671-1
SUSEHPE Helion OpenStack 8release-notes-hpe-helion-openstack8.20190911-3.20.3SUSE-SU-2019:2867-1
SUSEHPE Helion OpenStack 8venv-openstack-horizon-hpe12.0.4~dev6-14.26.2SUSE-SU-2019:2867-1
SUSEHPE Helion OpenStack 8, OpenStack Cloud 8ardana-ansible8.0+git.1566374355.c509923-3.67.3SUSE-SU-2019:2867-1
SUSEHPE Helion OpenStack 8, OpenStack Cloud 8ardana-glance8.0+git.1566376789.be0fe01-3.17.3SUSE-SU-2019:2867-1
SUSEHPE Helion OpenStack 8, OpenStack Cloud 8ardana-horizon8.0+git.1565816064.5d4f73f-3.18.3SUSE-SU-2019:2867-1
SUSEHPE Helion OpenStack 8, OpenStack Cloud 8ardana-input-model8.0+git.1566517401.98450e6-3.33.3SUSE-SU-2019:2867-1
SUSEHPE Helion OpenStack 8, OpenStack Cloud 8ardana-manila8.0+git.1568835837.2452e7a-1.21.3SUSE-SU-2019:2867-1
SUSEHPE Helion OpenStack 8, OpenStack Cloud 8ardana-neutron8.0+git.1568220097.74ee4b4-3.33.3SUSE-SU-2019:2867-1
69 more for SUSE in the JSON and on SUSE's page.
openSUSELeap 15.2rubygem-nokogiri1.8.5-lp152.4.3.1openSUSE-SU-2021:0237-1
openSUSETumbleweedruby3.2-rubygem-nokogiri1.13.9-1.7openSUSE-SU-2024:13165-1
openSUSETumbleweedrubygem-nokogiri1.13.3-1.1openSUSE-SU-2024:11912-1
openSUSETumbleweedrubygem-nokogiri1.15.5-1.5openSUSE-SU-2024:14174-1
openSUSETumbleweedrubygem-nokogiri1.18.2-1.1openSUSE-SU-2025:14697-1
openSUSETumbleweedrubygem-nokogiri1.18.9-1.4openSUSE-SU-2026:10356-1
Alpinev3.10, v3.11, v3.12 and 12 moreruby-nokogiri1.10.4-r0ALPINE-CVE-2019-5477

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0; the Alpine secdb, CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · SUSE · openSUSE · Alpine.

Attack patterns (CAPEC)

  • CAPEC-6 Argument Injection Likelihood: High · Severity: High
  • CAPEC-15 Command Delimiters Likelihood: High · Severity: High
  • CAPEC-43 Exploiting Multiple Input Interpretation Layers Likelihood: Medium · Severity: High
  • CAPEC-88 OS Command Injection Likelihood: High · Severity: High
  • CAPEC-108 Command Line Execution through SQL Injection Likelihood: Low · Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON