Arbitrary Code Execution Affecting bundler package, versions <2.2.33


0.0
medium

Snyk CVSS

    Attack Complexity High
    User Interaction Required
    Confidentiality High
    Integrity High
    Availability High

    Threat Intelligence

    EPSS 0.12% (46th percentile)
Expand this section
NVD
7.3 high
Expand this section
Red Hat
7.3 high

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk ID SNYK-RUBY-BUNDLER-2313646
  • published 9 Dec 2021
  • disclosed 9 Dec 2021
  • credit Unknown

How to fix?

Upgrade bundler to version 2.2.33 or higher.

Overview

Affected versions of this package are vulnerable to Arbitrary Code Execution via a Gemfile that includes gem entries that use the git option with invalid values with a leading dash.

The attacker has to craft a directory containing a Gemfile file that declares a dependency that is located in a Git repository. This dependency has to have a Git URL in the form of -u./payload. This URL will be used to construct a git clone command but will be interpreted as the upload-pack argument. Then this directory needs to be shared with the victim, who then needs to run a command that evaluates the Gemfile, such as bundle lock.