Security advisory
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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2019-5477
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 10:46 UTC · Revision 1
Source evidence
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.
osv:CVE-2019-5477
Complete source record
{
"id": "3943f640f4729b68c529bf3853ba8835dde7f9d4cfc69568336b172731e26baf",
"url": "https://osv.dev/vulnerability/CVE-2019-5477",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "CVE-2019-5477",
"summary": "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.",
"evidence": "osv:CVE-2019-5477",
"products": [],
"severity": "critical",
"structured": {
"id": "CVE-2019-5477",
"aliases": [
"CVE-2019-5477",
"GHSA-cr5j-953j-xw5p"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/sparklemotion/nokogiri",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"last_affected": "8e24af59af22c0bf61376d8c9ae6a85e5b2ba3bd"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:nokogiri:nokogiri:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "0"
},
{
"last_affected": "1.10.3"
}
],
"source": "CPE_RANGE"
}
]
}
}
],
"versions": [
"v1.10.3",
"v1.10.2",
"v1.8.5",
"v1.10.1",
"v1.10.0",
"v1.10.0.rc1",
"v1.9.1",
"v1.9.0",
"v1.9.0.rc1",
"v1.8.4",
"v1.8.3",
"v1.8.2",
"v1.8.1",
"v1.8.0",
"v1.7.0.1",
"v1.7.0",
"v1.6.8",
"v1.6.8.rc3",
"v1.6.8.rc2",
"v1.6.8.rc1",
"v1.6.7.rc4",
"v1.6.6.2",
"v1.6.7.rc3",
"v1.6.7.rc2",
"v1.6.7.rc1",
"1.7.0.1-linux-binary1",
"v1.6.6.1",
"v1.6.6",
"v1.6.5",
"v1.6.4",
"v1.6.3.1",
"v1.6.3",
"v1.6.3.rc3",
"v1.6.3.rc2",
"v1.6.3.rc1",
"v1.6.2.1",
"v1.6.2",
"v1.6.2.rc3",
"v1.6.2.rc1",
"v1.6.2.beta.1",
"v1.6.0",
"v1.5.9",
"v1.6.0.rc1",
"v1.5.8",
"v1.5.7",
"v1.5.7.rc3",
"v1.5.7.rc2",
"v1.5.7.rc1",
"v1.5.6",
"v1.5.6.rc2",
"v1.5.5.rc2",
"v1.5.5.rc1",
"v1.5.4.rc3",
"v1.5.4.rc2",
"v1.5.4.rc1",
"v1.5.3",
"v1.5.3.rc6",
"v1.5.3.rc5",
"v1.5.3.rc4",
"v1.5.3.rc3",
"v1.5.3.rc1",
"v1.5.2",
"v1.5.1",
"v1.5.1.rc1",
"v1.5.0",
"v1.5.0.beta.3",
"v1.5.0.beta.4",
"REL_1.5.0.beta.2",
"REL_1.5.0.beta.1",
"REL_1.0.7",
"REL_1.0.6",
"REL_1.0.5",
"REL_1.0.4",
"REL_1.0.3",
"REL_1.0.2",
"REL_1.0.1",
"REL_1.0.0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2019-5477.json"
}
}
],
"modified": "2026-10-20T10:51:40.213628895Z",
"provider": "osv",
"references": [
"https://github.com/tenderlove/rexical/blob/master/CHANGELOG.rdoc",
"https://lists.debian.org/debian-lts-announce/2019/09/msg00027.html",
"https://lists.debian.org/debian-lts-announce/2022/10/msg00018.html",
"https://lists.debian.org/debian-lts-announce/2022/10/msg00019.html",
"https://security.gentoo.org/glsa/202006-05",
"https://usn.ubuntu.com/4175-1/",
"https://hackerone.com/reports/650835",
"https://github.com/sparklemotion/nokogiri/issues/1915"
],
"provider_metadata": {
"unresolved_ranges": [
{
"cpes": [
"cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*",
"cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*",
"cpe:2.3:o:canonical:ubuntu_linux:19.04:*:*:*:*:*:*:*",
"cpe:2.3:o:canonical:ubuntu_linux:19.10:*:*:*:*:*:*:*"
],
"vendor_product": "canonical:ubuntu_linux",
"extracted_events": [
{
"range": [
{
"introduced": "16.04"
},
{
"last_affected": "16.04"
},
{
"introduced": "18.04"
},
{
"last_affected": "18.04"
},
{
"introduced": "19.04"
},
{
"last_affected": "19.04"
},
{
"introduced": "19.10"
},
{
"last_affected": "19.10"
}
],
"source": "CPE_STRING"
}
]
},
{
"cpes": [
"cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*",
"cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*"
],
"vendor_product": "debian:debian_linux",
"extracted_events": [
{
"range": [
{
"introduced": "8.0"
},
{
"last_affected": "8.0"
},
{
"introduced": "10.0"
},
{
"last_affected": "10.0"
}
],
"source": "CPE_STRING"
}
]
}
]
}
},
"related_cves": [
{
"value": "CVE-2019-5477",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 382741,
"published_at": "2019-08-16T16:15:10.637+00:00"
}