GHSA-73w7-6w9g-gc8w CVE-2017-0902
RubyGems has Origin Validation Error vulnerability
- Severity
- 8.1 / 10
- High · CVSS 3.0
- Exploit chance (EPSS)
- 4.75%
- Chance of exploitation in the next 30 days. Higher than 91.88% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-346 Origin Validation Error
- CWE-350 Reliance on Reverse DNS Resolution for a Security-Critical Action
- Fix
2.6.13- Upgrade rubygems-update to this version or later
Description
RubyGems version 2.6.12 and earlier is vulnerable to a DNS hijacking vulnerability that allows a MITM attacker to force the RubyGems client to download and install gems from a server that the attacker controls.
Affected versions
RubyGems
| Package | Vulnerable | Fixed in |
|---|---|---|
| rubygems-update | < 2.6.13 |
2.6.13 |
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.
rubygems-update RubyGems → 2.6.13
- bundler
bundle update rubygems-update # Gemfile: gem "rubygems-update", ">= 2.6.13"
Severity breakdown
CVSS 3.0 8.1
CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
- Attack vector
- Network
- Attack complexity
- High
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Weakness
CWE-346: Origin Validation Error
The product does not properly verify that the source of data or communication is valid.
CWE-350: Reliance on Reverse DNS Resolution for a Security-Critical Action
The product performs reverse DNS resolution on an IP address to obtain the hostname and make a security decision, but it does not properly ensure that the IP address is truly associated with the hostname.
How to prevent it
- Architecture and Design: Use other means of identity verification that cannot be simply spoofed. Possibilities include a username/password or certificate.
- Implementation: Perform proper forward and reverse DNS lookups to detect DNS spoofing.
References
Advisories
Packages
Other links
- github.com/rubygems/rubygems/commit/8d91516fb7037ecfb27622f605dc40245e0f8d32
- hackerone.com/reports/218088
- access.redhat.com/errata/RHSA-2017:3485
- access.redhat.com/errata/RHSA-2018:0378
- access.redhat.com/errata/RHSA-2018:0583
- access.redhat.com/errata/RHSA-2018:0585
- lists.debian.org/debian-lts-announce/2018/07/msg00012.html
- security.gentoo.org/glsa/201710-01
- usn.ubuntu.com/3553-1
- usn.ubuntu.com/3685-1
- web.archive.org/web/20170907040741/http://www.securityfocus.com/bid/100586
- web.archive.org/web/20170907215801/http://www.securitytracker.com/id/1039249
- debian.org/security/2017/dsa-3966
- blog.rubygems.org/2017/08/27/2.6.13-released.html
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| GHSA-228f-g3h7-3fj3 RubyGems HTTPS to HTTP redirect | Medium | Also affects rubygems-update |
| GHSA-5mgj-mvv8-46mw RubyGems does not verify SSL certificate | Medium | Also affects rubygems-update |
| GHSA-qv62-xfj6-32xm RubyGems Improper Input Validation vulnerability | Medium | Also affects rubygems-update |
| GHSA-9qvm-2vhf-q649 RubyGems Regular Expression Denial of Service | Medium | Also affects rubygems-update |
| GHSA-8qxg-mff5-j3wc RubyGems Path Traversal vulnerability | Medium | Also affects rubygems-update |
| GHSA-wp3j-rvfp-624h RubyGems vulnerable to DNS hijack attack | High | Also affects rubygems-update |
| GHSA-9j7m-rjqx-48vh RubyGems Regular Expression Denial of Service vulnerability | Medium | Also affects rubygems-update |
| GHSA-p7f2-rr42-m9xm RubyGems Improper Input Validation vulnerability | High | Also affects rubygems-update |
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