# CVE-2016-7954: Bundler allows attacker to inject arbitrary code via secondary Gem source

Source: https://junglewise.ai/threats/cve-2016-7954-bundler-allows-attacker-to-inject-arbitrary-code-via-secondary-gem  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2022-05-14  
License: CC BY 4.0 with a link back

CVE-2016-7954 · Severity: low · CVSS 3 · Published 2022-05-14

Bundler allows attacker to inject arbitrary code via secondary Gem source

Technologies: [bundler (RubyGems)](https://junglewise.ai/threats/technologies/bundler). Vendors: [RubyGems](https://junglewise.ai/threats/vendors/rubygems).

## Quick answers

**Is CVE-2016-7954 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2016-7954 being exploited in the wild.

**How severe is CVE-2016-7954?** Low severity, with a CVSS score of 3, published 14 May 2022.

**Which products and versions are affected?** bundler (RubyGems) ECOSYSTEM:introduced=1.0.0,fixed=2.0.0.

**Is there a fix for CVE-2016-7954?** Yes. bundler (RubyGems): upgrade to 2.0.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**Am I affected by CVE-2016-7954?** Check whether you run bundler (RubyGems) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- bundler (RubyGems): upgrade to 2.0.0 or later

  ```sh
  bundle update bundler
  ```


## Affected products

- bundler (RubyGems) ECOSYSTEM:introduced=1.0.0,fixed=2.0.0

## Identifiers

- CVE-2016-7954
- GHSA-jvgm-pfqv-887x

## Related threats

- [Bundler may install gems from a different source than expected](https://junglewise.ai/threats/cve-2013-0334-bundler-may-install-gems-from-a-different-source-than-expected)
- [Local Code Execution through Argument Injection via dash leading git url parameter in Gemfile.](https://junglewise.ai/threats/cve-2021-43809-local-code-execution-through-argument-injection-via-dash-leading)
- [Dependency Confusion in Bundler](https://junglewise.ai/threats/cve-2020-36327-dependency-confusion-in-bundler)
- [Insecure path handling in Bundler](https://junglewise.ai/threats/cve-2019-3881-insecure-path-handling-in-bundler)
