Skip to content

← Actionable
Medium, CVSS 6.7

Local Code Execution through Argument Injection via dash leading git url parameter in Gemfile.

CVE-2021-43809GHSA-fj7f-vq84-fh43

What to do

Vendor fix available. Upgrade each affected package to the fixed version on its release line (bundler 2.2.33), redeploy, then verify what is actually installed.

This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.

Affected packages

  • RubyGems bundler

    Affected
    < 2.2.33
    Fixed in
    2.2.33

Sources

Severity and exploitation
Exploitation
No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
CVSS
6.7 · CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H
EPSS
  • CVE-2021-43809: 2.91% estimated exploitation activity in the next 30 days; percentile 87.00 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description

As published by the source; long descriptions are shortened.

In bundler versions before 2.2.33, when working with untrusted and apparently harmless Gemfile's, it is not expected that they lead to execution of external code, unless that's explicit in the ruby code inside the Gemfile itself. However, if the Gemfile includes gem entries that use the git option with invalid, but seemingly harmless, values with a leading dash, this can be false. To handle dependencies that come from a Git repository instead of a registry, Bundler uses various commands, such as git clone. These commands are being constructed using user input (e.g. the repository URL). When building the commands, Bundler versions before 2.2.33 correctly avoid Command Injection vulnerabilities by passing an array of arguments instead of a command string. However, there is the possibility that a user input starts with a dash (-) and is therefore treated as an optional argument instead of a positional one. This can lead to Code Execution because some of the commands have options that…

Dates and revisions
Published by the source
Last modified by the source
Source last checked
  1. Revision 1 · created ·

    Published from ghsa record GHSA-fj7f-vq84-fh43

Agent brief

Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.

# Patch Next advisory brief: CVE-2021-43809

Advisory: Local Code Execution through Argument Injection via dash leading git url parameter in Gemfile.
IDs: CVE-2021-43809, GHSA-fj7f-vq84-fh43
Record: https://patchnext.com/advisories/cve-2021-43809 (revision 1, source checked 26 Oct 2026, 15:51 UTC)
Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected.
Severity: Medium (CVSS 6.7)
Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV.
Vendor response: Vendor fix available; fixed versions by package: bundler 2.2.33. A vendor fix does not mean a deployment is fixed.

## Affected components
- RubyGems bundler: affected < 2.2.33; fixed in 2.2.33

## Suggested inspection (read-only)
- RubyGems bundler: check the installed version with your package manager.

## Supported action
Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on bundler.
- Repeat the inspection and confirm that only fixed versions remain installed.

## Rollback considerations
- Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward.

## Unresolved questions
- Which deployments run an affected version?
- Exploitation status can change. Check again before lowering the priority.
- Mark the work resolved only after the fixed version is verified in production.

## Sources
- Verified: https://github.com/advisories/GHSA-fj7f-vq84-fh43 (GitHub-reviewed advisory GHSA-fj7f-vq84-fh43 lists affected ranges: RubyGems bundler >=0 <2.2.33)

Commands are suggestions: review each one before running it.

Loading voting…