Arbitrary Code Execution Affecting bundler package, versions <2.2.33


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team

    Threat Intelligence

    EPSS
    0.12% (47th percentile)

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.

CVSS Scores

version 3.1
Expand this section

Snyk

Recommended
6.7 medium
  • Attack Vector (AV)
    Local
  • Attack Complexity (AC)
    High
  • Privileges Required (PR)
    Low
  • User Interaction (UI)
    Required
  • Scope (S)
    Unchanged
  • Confidentiality (C)
    High
  • Integrity (I)
    High
  • Availability (A)
    High
Expand this section

NVD

7.3 high
Expand this section

SUSE

7.3 high
Expand this section

Red Hat

7.3 high