Skip to content

GHSA-fp4w-jxhp-m23p CVE-2020-36327

Dependency Confusion in Bundler

High RubyGems
Severity
8.8 / 10
High · CVSS 3.1
Exploit chance (EPSS)
6.31%
Chance of exploitation in the next 30 days. Higher than 93.61% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
—
Not classified
Fix
2.2.10
Upgrade bundler to this version or later

Description

Bundler 1.16.0 through 2.2.9 and 2.2.11 through 2.2.17 sometimes chooses a dependency source based on the highest gem version number, which means that a rogue gem found at a public source may be chosen, even if the intended choice was a private gem that is a dependency of another private gem that is explicitly depended on by the application.

Affected versions

RubyGems

PackageVulnerableFixed in
bundler
>= 1.16.0, < 2.2.10
2.2.10
bundler
>= 2.2.11, < 2.2.18
2.2.18

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.

bundler RubyGems → 2.2.10

bundler
bundle update bundler # Gemfile: gem "bundler", ">= 2.2.10"

Severity breakdown

CVSS 3.1 8.8

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
GHSA-jvgm-pfqv-887x
Bundler allows attacker to inject arbitrary code via secondary Gem source
Critical Also affects bundler
GHSA-49jx-9cmc-xjxm
Bundler may install gems from a different source than expected
Medium Also affects bundler
GHSA-fj7f-vq84-fh43
Local Code Execution through Argument Injection via dash leading git url parameter in Gemfile.
Medium Also affects bundler
GHSA-g98m-96g9-wfjq
Insecure path handling in Bundler
High Also affects bundler
Is this in your code?

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