CVE-2019-5477: A command injection vulnerability in Nokogiri v1.10.3 and earlier allows commands to be executed in a subprocess via Ruby's `Kernel.open`…
Noroxi assessment
Priority: Plan (action score 41/100)
- The sources we track (CISA KEV, Exploit-DB, Metasploit, Nuclei, GitHub) show no public exploit code or exploitation in the wild.
- Probability of exploitation in the next 30 days: 5.8% (FIRST EPSS); higher than 93.3% of all records.
- Anyone who can reach it over the internet can trigger it. No account or password is required. No user action is required. No special conditions are required; it is repeatable.
- Fixed version: ruby-nokogiri (Alpine:v3.10) 1.10.4-r0; rexical (Debian:10) 1.0.5-2+deb10u1; ruby-nokogiri (Debian:10) 1.10.0+dfsg1-2+deb10u1.
Add it to your regular patch cycle. Upgrade to ruby-nokogiri (Alpine:v3.10) 1.10.4-r0; rexical (Debian:10) 1.0.5-2+deb10u1; ruby-nokogiri (Debian:10) 1.10.0+dfsg1-2+deb10u1 or later.
Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it
Primary sources: NVD · CVE.org · FIRST EPSS
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.
- Published
- Aug 16, 2019
- Updated
- Jun 16, 2026
- EPSS
- 5.8% · 93th percentile
- CWE
- CWE-78
Report tools
Action score
41
Add it to your regular patch cycle.
- CVSS
- 39 / 40 · 9.8 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 2 / 30 · 5.8%
Get told when this record changes
- Not in KEV: no record of exploitation in the wild
- No public exploit code on record
- A fix has been released
If any of these changes, we'll tell you in the daily email digest.
Is your version affected? Check itNoroxi analysis
What does it mean in your environment?
The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.
We use this product, ask for helpAffected systems
Is your version affected?
Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.
| Vendor | Product | CPE |
|---|---|---|
| nokogiri | nokogiri | cpe:2.3:a:nokogiri:nokogiri |
| canonical | ubuntu linux | cpe:2.3:o:canonical:ubuntu_linux |
| debian | debian linux | cpe:2.3:o:debian:debian_linux |
Versions reported by the vendor
Affected version ranges reported by the assigning authority (hackerone). Independent of NVD's CPE analysis and usually ahead of it.
n/a Nokogiri (ruby gem)
- Fixed in v1.10.4affected
Affected versions · NVD (7)
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- canonical ubuntu linux16.04
- canonical ubuntu linux18.04
- canonical ubuntu linux19.04
- canonical ubuntu linux19.10
- debian debian linux10.0
- debian debian linux8.0
- nokogiri nokogiriup to 1.10.3 inclusive
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| Alpine:v3.10 | ruby-nokogiri | before 1.10.4-r0 | 1.10.4-r0 |
| Debian:10 | rexical | before 1.0.5-2+deb10u1 | 1.0.5-2+deb10u1 |
| Debian:10 | ruby-nokogiri | before 1.10.0+dfsg1-2+deb10u1 | 1.10.0+dfsg1-2+deb10u1 |
| Debian:12 | rexical | before 1.0.7-1 | 1.0.7-1 |
| Debian:12 | ruby-nokogiri | before 1.10.4+dfsg1-1 | 1.10.4+dfsg1-1 |
| Debian:8 | ruby-nokogiri | before 1.6.3.1+ds-1+deb8u1 | 1.6.3.1+ds-1+deb8u1 |
| openSUSE:Leap 15.2 | rubygem-nokogiri | before 1.8.5-lp152.4.3.1 | 1.8.5-lp152.4.3.1 |
| RubyGems | nokogiri | before 1.10.4 | 1.10.4 |
| RubyGems | rexical | before 1.0.7 | 1.0.7 |
| SUSE:HPE Helion OpenStack 8 | ardana-ansible | before 8.0+git.1566374355.c509923-3.67.3 | 8.0+git.1566374355.c509923-3.67.3 |
| SUSE:HPE Helion OpenStack 8 | ardana-glance | before 8.0+git.1566376789.be0fe01-3.17.3 | 8.0+git.1566376789.be0fe01-3.17.3 |
| SUSE:HPE Helion OpenStack 8 | ardana-horizon | before 8.0+git.1565816064.5d4f73f-3.18.3 | 8.0+git.1565816064.5d4f73f-3.18.3 |
| SUSE:HPE Helion OpenStack 8 | ardana-input-model | before 8.0+git.1566517401.98450e6-3.33.3 | 8.0+git.1566517401.98450e6-3.33.3 |
| SUSE:HPE Helion OpenStack 8 | ardana-manila | before 8.0+git.1568835837.2452e7a-1.21.3 | 8.0+git.1568835837.2452e7a-1.21.3 |
| SUSE:HPE Helion OpenStack 8 | ardana-neutron | before 8.0+git.1568220097.74ee4b4-3.33.3 | 8.0+git.1568220097.74ee4b4-3.33.3 |
| SUSE:HPE Helion OpenStack 8 | ardana-nova | before 8.0+git.1566902754.c58ff69-3.35.3 | 8.0+git.1566902754.c58ff69-3.35.3 |
| SUSE:HPE Helion OpenStack 8 | ardana-octavia | before 8.0+git.1568373448.bcaee7e-3.20.3 | 8.0+git.1568373448.bcaee7e-3.20.3 |
| SUSE:HPE Helion OpenStack 8 | ardana-tempest | before 8.0+git.1566471887.fd2fec7-3.27.3 | 8.0+git.1566471887.fd2fec7-3.27.3 |
| SUSE:HPE Helion OpenStack 8 | galera-3 | before 25.3.25-4.6.3 | 25.3.25-4.6.3 |
| SUSE:HPE Helion OpenStack 8 | grafana | before 4.6.5-4.6.3 | 4.6.5-4.6.3 |
| SUSE:HPE Helion OpenStack 8 | mariadb | before 10.2.25-4.14.2 | 10.2.25-4.14.2 |
| SUSE:HPE Helion OpenStack 8 | mariadb-connector-c | before 3.1.2-3.12.3 | 3.1.2-3.12.3 |
| SUSE:HPE Helion OpenStack 8 | novnc | before 1.0.0-3.6.3 | 1.0.0-3.6.3 |
| SUSE:HPE Helion OpenStack 8 | openstack-cinder | before 11.2.3~dev16-3.21.4 | 11.2.3~dev16-3.21.4 |
+71
Same product
nokogiri: all recordsOther highest-scoring records for the same primary product.
- CVE-2026-79770Nokogiri before 1.19.3 ReDoS via CSS selector tokenizer34Monitor
- CVE-2022-29181Improper Handling of Unexpected Data Type in Nokogiri33Monitor
- CVE-2022-23476Unchecked return value from xmlTextReaderExpand in Nokogiri31Monitor
Published before and after this one in the same product
- Later →CVE-2013-6460Nov 5, 2019 · Nokogiri gem 1.5.x has Denial of Service via infinite loop when parsing XML documents27Monitor
- Later →CVE-2013-6461Nov 5, 2019 · Nokogiri gem 1.5.x and 1.6.x has DoS while parsing XML entities by failing to apply limits27Monitor
- Later →CVE-2012-6685Feb 19, 2020 · Nokogiri before 1.5.4 is vulnerable to XXE attacks31Monitor
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| alpine:ruby-nokogiri | 1.10.4-r0 · Alpine:v3.10 | Package registry (OSV) |
| debian:rexical | 1.0.7-1 · Debian:12 | Package registry (OSV) |
| debian:ruby-nokogiri | 1.10.4+dfsg1-1 · Debian:12 | Package registry (OSV) |
| opensuse:rubygem-nokogiri | 1.8.5-lp152.4.3.1 · openSUSE:Leap 15.2 | Package registry (OSV) |
| RubyGems:nokogiri | 1.10.4 | Package registry (OSV) |
| RubyGems:rexical | 1.0.7 | Package registry (OSV) |
| suse:crowbar-core | 4.0+git.1570463621.40b11cd48-9.54.1 · SUSE:OpenStack Cloud 7 | Package registry (OSV) |
| suse:crowbar-openstack | 4.0+git.1569429513.e7016b2b6-9.59.1 · SUSE:OpenStack Cloud 7 | Package registry (OSV) |
| suse:grafana | 4.6.5-1.11.2 · SUSE:OpenStack Cloud 7 | Package registry (OSV) |
| suse:novnc | 1.0.0-12.1 · SUSE:OpenStack Cloud 7 | Package registry (OSV) |
| suse:openstack-keystone | 10.0.3~dev9-7.18.2 · SUSE:OpenStack Cloud 7 | Package registry (OSV) |
| suse:openstack-keystone-doc | 10.0.3~dev9-7.18.2 · SUSE:OpenStack Cloud 7 | Package registry (OSV) |
| suse:openstack-neutron | 9.4.2~dev21-7.32.1 · SUSE:OpenStack Cloud 7 | Package registry (OSV) |
| suse:openstack-neutron-doc | 9.4.2~dev21-7.32.1 · SUSE:OpenStack Cloud 7 | Package registry (OSV) |
| suse:openstack-neutron-lbaas | 9.2.2~dev11-4.18.3 · SUSE:OpenStack Cloud 7 | Package registry (OSV) |
| suse:openstack-neutron-lbaas-doc | 9.2.2~dev11-4.18.3 · SUSE:OpenStack Cloud 7 | Package registry (OSV) |
| suse:openstack-nova | 14.0.11~dev13-4.34.3 · SUSE:OpenStack Cloud 7 | Package registry (OSV) |
| suse:openstack-nova-doc | 14.0.11~dev13-4.34.2 · SUSE:OpenStack Cloud 7 | Package registry (OSV) |
Exploit status
No known public exploit
No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
No dated events beyond publication.
Not on record for this CVE: EPSS history · patch commit or PR link · researcher credit · variant or chain candidate · public bounty program.
Technical details
Attack conditions
- Anyone who can reach it over the internet can trigger it.
- No account or password is required.
- No user action is required.
- No special conditions are required; it is repeatable.
If successful
- Confidentiality
- high · data can be read
- Integrity
- high · data or configuration can be modified
- Availability
- high · the service can be disrupted
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality impact
- High
- Integrity impact
- High
- Availability impact
- High
Weakness class (CWE)
CWE-78 · Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
nvd-primary
Root cause
User input is inserted as text into a shell command. The shell may interpret special characters in the input as part of the command.
The bug in code
The whole CWE-78 classA representative example of this vulnerability class. Not the vendor's source code; it shows the faulty pattern and its fix.
Vulnerable
const host = req.body.host;
exec("ping -c 1 " + host, onResult);Fixed
const host = req.body.host;
if (!/^[a-z0-9.-]{1,253}$/i.test(host)) return res.sendStatus(400);
execFile("ping", ["-c", "1", host], onResult);Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
Attack patterns (CAPEC)
- Command Line Execution through SQL InjectionCAPEC-108likelihood: Low · Very High
- Command DelimitersCAPEC-15likelihood: High · High
- Exploiting Multiple Input Interpretation LayersCAPEC-43likelihood: Medium · High
- Argument InjectionCAPEC-6likelihood: High · High
- OS Command InjectionCAPEC-88likelihood: High · High
ATT&CK techniques
—
Change log (1)
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
Show all references (7 more)Show less
- github.com/tenderlove/rexical/blob/master/CHANGELOG.rdoc
- hackerone.com/reports/650835
- lists.debian.org/debian-lts-announce/2019/09/msg00027.html
- lists.debian.org/debian-lts-announce/2022/10/msg00018.html
- lists.debian.org/debian-lts-announce/2022/10/msg00019.html
- security.gentoo.org/glsa/202006-05
- usn.ubuntu.com/4175-1/
Vendor advisories and official records. Exploit/PoC links are deliberately left out.