KeygraphLabs · CVE MCP

CVE-2019-5477 · hackerone

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` 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 2019-08-16, last changed 2026-06-17. Weakness: CWE-78.

CVSS
9.8
critical, from NVD
EPSS
6.14%
percentile 93.7%, chance of exploitation in 30 days
Exploitation
None known
no KEV listing or public exploit in our indexes

How to fix

Upgrade to a fixed version: nokogiri 1.10.4 (RubyGems); rexical 1.0.7 (RubyGems). For the version that clears every advisory for your installed version, ask an agent for get_remediation.

Where the flaw is in the code

Fixed in sparklemotion/nokogiri by 5d30128343. Functions changed by the fix: initialize, text, cdata, comment, to_xml, method_missing, insert, scan_setup, action, scan_str, load_file, scan_file. Regression tests: test/xml/test_builder.rb. Confidence: inferred (code changed near the fix, but no record names this exact commit as the fix).

Timeline

2019-08-16Published
2019-08-19Package advisory GHSA-cr5j-953j-xw5p
2026-06-17Record last changed
2026-11-30EPSS when our history starts: 6.14%
2026-12-02Code-level analysis added

Affected packages

AdvisoryPackageFixed in
GHSA-cr5j-953j-xw5pnokogiri (RubyGems)1.10.4
GHSA-cr5j-953j-xw5prexical (RubyGems)1.0.7

Also known as: GHSA-cr5j-953j-xw5p

Related

CVEPublishedCVSSSummary
CVE-2026-1260642026-11-102Nokogiri: Possible Use-After-Free when setting an attribute value via `Nokogiri::XML::Node#[]=` or `#lang=`
CVE-2026-1260632026-11-102.3Nokogiri: Mutation XSS through `noscript` content in Nokogiri's HTML5 serializer
CVE-2026-1260622026-11-103.7Nokogiri : Possible SSRF on JRuby when resolving external DTDs or entities with `NONET` set
CVE-2026-797722026-08-256.9Nokogiri before 1.19.1 Unchecked Return Value canonicalize
CVE-2026-797712026-08-256.9Nokogiri before 1.19.3 Memory Leak via XSLT Transform
CVE-2026-797702026-08-258.7Nokogiri before 1.19.3 ReDoS via CSS selector tokenizer
CVE-2026-574382026-06-256.6Nokogiri: Possible Use-After-Free in XInclude Processing
CVE-2026-574372026-06-255.3Nokogiri: Possible Use-After-Free when directly using `NokogirI::XML::XPathContext` beyond document lifetime

Add it to your agent

One command for Claude Code; setup for Claude Desktop, Cursor and others. No signup or key.

claude mcp add --transport http keygraph-cve https://cve-mcp.keygraph.io/mcp

Then ask for triage_cve CVE-2019-5477, or call /api/v1/vulnerabilities/CVE-2019-5477. To prove whether it is exploitable in your running app, run Shannon, Keygraph's open-source AI pentester.

NVD · CVE.org