GHSA-cf46-6xxh-pc75 CVE-2019-13118
libxslt Type Confusion vulnerability that affects Nokogiri
- Severity
- 7.5 / 10
- High · CVSS 3.0
- Exploit chance (EPSS)
- 5.15%
- Chance of exploitation in the next 30 days. Higher than 92.42% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-843 Access of Resource Using Incompatible Type ('Type Confusion')
- Fix
1.10.5- Upgrade nokogiri to this version or later
Description
In numbers.c in libxslt 1.1.33, a type holding grouping characters of an xsl:number instruction was too narrow and an invalid character/length combination could be passed to xsltNumberFormatDecimal, leading to a read of uninitialized stack data.
Nokogiri prior to version 1.10.5 used a vulnerable version of libxslt. Nokogiri 1.10.5 updated libxslt to version 1.1.34 to address this and other vulnerabilities in libxslt.
Affected versions
RubyGems
| Package | Vulnerable | Fixed in |
|---|---|---|
| nokogiri | < 1.10.5 |
1.10.5 |
How to fix
Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.
nokogiri RubyGems → 1.10.5
- bundler
bundle update nokogiri # Gemfile: gem "nokogiri", ">= 1.10.5"
Severity breakdown
CVSS 3.0 7.5
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- None
- Availability
- None
Weakness
CWE-843: Access of Resource Using Incompatible Type ('Type Confusion')
The product allocates or initializes a resource such as a pointer, object, or variable using one type, but it later accesses that resource using a type that is incompatible with the original type.
References
Advisories
Other links
- github.com/sparklemotion/nokogiri/issues/1943
- github.com/sparklemotion/nokogiri/commit/43a175339b47b8c604508813fc75b83f13cd173e
- bugs.chromium.org/p/oss-fuzz/issues/detail
- seclists.org/bugtraq/2019/Jul/36
- seclists.org/bugtraq/2019/Jul/37
- seclists.org/bugtraq/2019/Jul/40
- seclists.org/bugtraq/2019/Jul/41
- seclists.org/bugtraq/2019/Jul/42
- security.netapp.com/advisory/ntap-20190806-0004
- security.netapp.com/advisory/ntap-20200122-0003
- support.apple.com/kb/HT210346
- support.apple.com/kb/HT210348
- support.apple.com/kb/HT210351
- support.apple.com/kb/HT210353
- support.apple.com/kb/HT210356
- support.apple.com/kb/HT210357
- support.apple.com/kb/HT210358
- usn.ubuntu.com/4164-1
- oracle.com/security-alerts/cpujan2020.html
- github.com/sparklemotion/nokogiri/blob/f7aa3b0b29d6fe5fafe93dacd9b96b6b3d16b7ec…
- github.com/sparklemotion/nokogiri/releases/tag/v1.10.5
- gitlab.gnome.org/GNOME/libxslt/commit/6ce8de69330783977dd14f6569419489875fb71b
- lists.apache.org/thread.html/r58af02e294bd07f487e2c64ffc0a29b837db5600e33b6e698b9d696…
- lists.apache.org/thread.html/r58af02e294bd07f487e2c64ffc0a29b837db5600e33b6e698b9d696…
- lists.apache.org/thread.html/rf4c02775860db415b4955778a131c2795223f61cb8c6a450893651e…
- lists.apache.org/thread.html/rf4c02775860db415b4955778a131c2795223f61cb8c6a450893651e…
- lists.debian.org/debian-lts-announce/2019/07/msg00020.html
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/IOY…
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/IOYJK…
- oss-fuzz.com/testcase-detail/5197371471822848
- seclists.org/bugtraq/2019/Aug/21
- seclists.org/bugtraq/2019/Aug/22
- seclists.org/bugtraq/2019/Aug/23
- seclists.org/bugtraq/2019/Aug/25
- seclists.org/bugtraq/2019/Jul/35
- lists.opensuse.org/opensuse-security-announce/2020-05/msg00062.html
- seclists.org/fulldisclosure/2019/Aug/11
- seclists.org/fulldisclosure/2019/Aug/13
- seclists.org/fulldisclosure/2019/Aug/14
- seclists.org/fulldisclosure/2019/Aug/15
- seclists.org/fulldisclosure/2019/Jul/22
- seclists.org/fulldisclosure/2019/Jul/23
- seclists.org/fulldisclosure/2019/Jul/24
- seclists.org/fulldisclosure/2019/Jul/26
- seclists.org/fulldisclosure/2019/Jul/31
- seclists.org/fulldisclosure/2019/Jul/37
- seclists.org/fulldisclosure/2019/Jul/38
- openwall.com/lists/oss-security/2019/11/17/2
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| GHSA-phwj-rprq-35pp Nokogiri: Possible Use-After-Free when setting an attribute value via `Nokogiri::XML::Attr#value=` or `#content=` | High | Also affects nokogiri |
| GHSA-wfpw-mmfh-qq69 Nokogiri: Possible Use-After-Free in XInclude Processing | Low | Also affects nokogiri |
| GHSA-p67v-3w7g-wjg7 Nokogiri: Possible Use-After-Free when directly using `NokogirI::XML::XPathContext` beyond document lifetime | Medium | Also affects nokogiri |
| GHSA-wjv4-x9w8-wm3h Nokogiri: Possible Use-After-Free when setting `Document#root=` to an invalid node type | Medium | Also affects nokogiri |
| GHSA-5prr-v3j2-97mh Nokogiri: Possible Out-of-Bounds Read in `Nokogiri::XML::NodeSet#[]` | High | Also affects nokogiri |
| GHSA-9cv2-cfxc-v4v2 Nokogiri: Null Pointer Dereference calling methods on uninitialized wrapper classes | High | Also affects nokogiri |
| GHSA-8678-w3jw-xfc2 Nokogiri: XML::Schema on JRuby allows network requests when NONET is set, bypassing CVE-2020-26247 | Low | Also affects nokogiri |
| GHSA-5v8h-3h3q-446p Nokogiri: Possible Use-After-Free when `Nokogiri::XML::Document#encoding=` raises an exception | High | Also affects nokogiri |
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor