CVE-2019-13117: Nokogiri Uninitialized Read Vulnerability

MODERATE
Advisory Identifier: GHSA-4hm9-844j-jmxp
CVSS 5.3
CWE-908
Published
Advisory Summary

CVE-2019-13117 is a MODERATE (CVSS 5.3) uninitialized read vulnerability (CWE-908: Use of Uninitialized Resource) affecting Nokogiri libraries in the RubyGems ecosystem. The issue involves uninitialized read in nokogiri gem. Remediation is available by upgrading affected packages to version 1.10.5.

CVE-2019-13117 at a Glance

CVE Identifier CVE-2019-13117
GHSA Identifier GHSA-4hm9-844j-jmxp
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-908: Use of Uninitialized Resource
Affected Product Nokogiri
Package Ecosystem RubyGems
Published Date
Last Updated

Security Impact

CVSS: 5.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2019-13117

To remediate this vulnerability, upgrade all affected Nokogiri dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

nokogiri fixed: 1.10.5
Upgrade nokogiri to 1.10.5
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for nokogiri

How to Check if You Are Affected

To determine whether your application is affected by CVE-2019-13117, inspect your project dependencies for Nokogiri:

inspect dependencies for nokogiri

Analyze the terminal output to locate any version of Nokogiri in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.10.5), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-908: Use of Uninitialized Resource, where the product uses or accesses a resource that has not been initialized. In Nokogiri, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

In numbers.c in libxslt 1.1.33, an xsl:number with certain format strings could lead to a uninitialized read in xsltNumberFormatInsertNumbers. This could allow an attacker to discern whether a byte on the stack contains the characters A, a, I, i, or 0, or any other character.

CVE-2019-13117 Affected Nokogiri Versions

1 component(s)
Fixed Versions:
1.10.5
Product / Package Ecosystem Affected Versions Fixed Version
nokogiri
RubyGems
< 1.10.5
1.10.5

References

NVD — CVE-2019-13117 NVD
https://nvd.nist.gov/vuln/detail/CVE-2019-13117
Nokogiri Source Repository REPOSITORY
https://github.com/sparklemotion/nokogiri/issues/1943
Nokogiri Security Information SECURITY
https://www.oracle.com/security-alerts/cpujan2020.html
usn.ubuntu.com/4164-1 WEB
https://usn.ubuntu.com/4164-1
Nokogiri Security Information SECURITY
https://security.netapp.com/advisory/ntap-20200122-0003
Nokogiri Security Information SECURITY
https://security.netapp.com/advisory/ntap-20190806-0004
oss-fuzz.com/testcase-detail/563... WEB
https://oss-fuzz.com/testcase-detail/5631739747106816
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/IOYJKXPQCUNBMMQJWYXOR6QRUJZHEDRZ
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/IOYJKXPQCUNBMMQJWYXOR6QRUJZHEDRZ
lists.debian.org/debian-lts-announce... WEB
https://lists.debian.org/debian-lts-announce/2019/07/msg00020.html
lists.apache.org/thread.html/rf4c027... WEB
https://lists.apache.org/thread.html/rf4c02775860db415b4955778a131c2795223f61cb8c6a450893651e4@%3Cissues.bookkeeper.apache.org%3E
lists.apache.org/thread.html/rf4c027... WEB
https://lists.apache.org/thread.html/rf4c02775860db415b4955778a131c2795223f61cb8c6a450893651e4%40%3Cissues.bookkeeper.apache.org%3E
lists.apache.org/thread.html/r58af02... WEB
https://lists.apache.org/thread.html/r58af02e294bd07f487e2c64ffc0a29b837db5600e33b6e698b9d696b@%3Cissues.bookkeeper.apache.org%3E
lists.apache.org/thread.html/r58af02... WEB
https://lists.apache.org/thread.html/r58af02e294bd07f487e2c64ffc0a29b837db5600e33b6e698b9d696b%40%3Cissues.bookkeeper.apache.org%3E
gitlab.gnome.org/gnome/libxslt/commi... WEB
https://gitlab.gnome.org/GNOME/libxslt/commit/c5eb6cf3aba0af048596106ed839b4ae17ecbcb1
Nokogiri Source Repository REPOSITORY
https://github.com/rubysec/ruby-advisory-db/blob/master/gems/nokogiri/CVE-2019-13117.yml
bugs.chromium.org/p/oss-fuzz/issues/d... WEB
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14471
Nokogiri Security Information SECURITY
http://lists.opensuse.org/opensuse-security-announce/2020-05/msg00062.html
Nokogiri Security Information SECURITY
http://www.openwall.com/lists/oss-security/2019/11/17/2

Frequently Asked Questions

What is CVE-2019-13117?
CVE-2019-13117 is a security vulnerability in Nokogiri involving Uninitialized read in Nokogiri gem under CWE-908: Use of Uninitialized Resource.
Which Nokogiri versions are affected?
Affected versions include releases prior to 1.10.5 across affected packages: nokogiri.
What version fixes CVE-2019-13117?
Upgrading to 1.10.5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is nokogiri affected?
Yes, nokogiri is affected in releases prior to 1.10.5. Upgrade your dependency to 1.10.5 or later.
What is the CVSS score of CVE-2019-13117?
CVE-2019-13117 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N.
What CWE is associated with CVE-2019-13117?
CVE-2019-13117 is classified under CWE-908: Use of Uninitialized Resource (The product uses or accesses a resource that has not been initialized.).
How can I check RubyGems dependencies for CVE-2019-13117?
Run the dependency tree command: 'inspect dependencies for nokogiri'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-4hm9-844j-jmxp",
  "modified" : "2026-06-10T13:40:34Z",
  "published" : "2022-05-24T16:49:06Z",
  "aliases" : [ "CVE-2019-13117" ],
  "summary" : "Uninitialized read in Nokogiri gem",
  "details" : "In numbers.c in libxslt 1.1.33, an xsl:number with certain format strings could lead to a uninitialized read in xsltNumberFormatInsertNumbers. This could allow an attacker to discern whether a byte on the stack contains the characters A, a, I, i, or 0, or any other character.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "nokogiri"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.10.5"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2019-13117"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/sparklemotion/nokogiri/issues/1943"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/security-alerts/cpujan2020.html"
  }, {
    "type" : "WEB",
    "url" : "https://usn.ubuntu.com/4164-1"
  }, {
    "type" : "WEB",
    "url" : "https://security.netapp.com/advisory/ntap-20200122-0003"
  }, {
    "type" : "WEB",
    "url" : "https://security.netapp.com/advisory/ntap-20190806-0004"
  }, {
    "type" : "WEB",
    "url" : "https://oss-fuzz.com/testcase-detail/5631739747106816"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/IOYJKXPQCUNBMMQJWYXOR6QRUJZHEDRZ"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/IOYJKXPQCUNBMMQJWYXOR6QRUJZHEDRZ"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2019/07/msg00020.html"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/rf4c02775860db415b4955778a131c2795223f61cb8c6a450893651e4@%3Cissues.bookkeeper.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/rf4c02775860db415b4955778a131c2795223f61cb8c6a450893651e4%40%3Cissues.bookkeeper.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r58af02e294bd07f487e2c64ffc0a29b837db5600e33b6e698b9d696b@%3Cissues.bookkeeper.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r58af02e294bd07f487e2c64ffc0a29b837db5600e33b6e698b9d696b%40%3Cissues.bookkeeper.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://gitlab.gnome.org/GNOME/libxslt/commit/c5eb6cf3aba0af048596106ed839b4ae17ecbcb1"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/nokogiri/CVE-2019-13117.yml"
  }, {
    "type" : "WEB",
    "url" : "https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14471"
  }, {
    "type" : "WEB",
    "url" : "http://lists.opensuse.org/opensuse-security-announce/2020-05/msg00062.html"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2019/11/17/2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-908" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-06-09T23:00:36Z",
    "nvd_published_at" : "2019-07-01T02:15:00Z"
  }
}