CVEBrief

Home / rubygems / rubygems / CVE-2021-43809

CVE-2021-43809: is it exploited, and which versions of rubygems are affected and fixed?

CVE-2021-43809 is an argument injection vulnerability in rubygems. It is not known to be exploited: it is not in CISA's Known Exploited Vulnerabilities catalog (catalog 2026.11.30, read December 3, 2026, 13:08 UTC). Affected: bundler before 2.2.33 (GitHub advisory GHSA-fj7f-vq84-fh43). Fixed in 2.2.33 (GitHub advisory GHSA-fj7f-vq84-fh43). Severity: Medium (6.7, CVSS 3.1, from GitHub_M).

Data checked December 3, 2026: last read CISA KEV December 3, 2026, 13:08 UTC, CVE record November 19, 2026, 07:15 UTC and NVD November 19, 2026, 07:52 UTC.

Exploited in the wild
Not in CISA KEV
KEV read December 3, 2026, 13:08 UTC
Affected
bundler before 2.2.33
GitHub advisory GHSA-fj7f-vq84-fh43
Fixed in
2.2.33
GitHub advisory GHSA-fj7f-vq84-fh43
Severity
Medium 6.7
CVSS 3.1 from GitHub_M
Exploit odds (EPSS)
3.06% in 30 days
higher than 88% of CVEs; FIRST, December 2, 2026
Free for up to 3 items: a weekly email, and an alert the day CISA lists one as exploited. We email you once to confirm. More about the watch

What is CVE-2021-43809?

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

`Bundler` is a package for managing application dependencies in Ruby. 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 can be leveraged to run arbitrary executables. Since this value comes from the `Gemfile` file, it can contain any character, including a leading dash. To exploit this vulnerability, an 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`, inside. This vulnerability can lead to Arbitrary Code Execution, which could potentially lead to the takeover of the system. However, the exploitability is very low, because it requires a lot of user interaction. Bundler 2.2.33 has patched this problem by inserting `--` as an argument before any positional arguments to those Git commands that were affected by this issue. Regardless of whether users can upgrade or not, they should review any untrustred `Gemfile`'s before running any `bundler` commands that may read them, since they can contain arbitrary ruby code.

From the CVE record by GitHub_M, last updated November 2, 2026, 18:14 UTC.

Which versions are affected, and which fix it?

VendorProductAffectedFixed or not affected from
rubygemsrubygems< 2.2.33

As the CVE record by GitHub_M states it, last updated November 2, 2026. Version ranges are the CNA's; a version the record calls not affected is usually the fix.

Which packages are affected, and in which version is each fixed?

EcosystemPackageAffectedFixed inAdvisory
RubyGemsbundler< 2.2.332.2.33GHSA-fj7f-vq84-fh43

GitHub Advisory Database, reviewed advisories (CC BY 4.0); advisory updated November 3, 2025. Summary: Local Code Execution through Argument Injection via dash leading git url parameter in Gemfile..

Which products and versions does the NVD list as affected?

VendorProductVersionsType
bundlerbundlerbefore 2.2.33application

NVD analysis (status Modified), last modified November 2, 2026, 19:17 UTC.

How severe is CVE-2021-43809?

ScoreVersionVectorSource
Medium 6.7CVSS 3.1CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:HGitHub_M
High 7.3CVSS 3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:HNVD
High 9.3CVSS 2.0AV:N/AC:M/Au:N/C:C/I:C/A:CNVD

Each score is shown as its source gave it: the CNA that wrote the record, CISA's ADP (vulnrichment) and the NVD. They can differ.

What the ratings mean: in CVSS 3 and 4, scores run from 0 to 10, with Low 0.1 to 3.9, Medium 4.0 to 6.9, High 7.0 to 8.9 and Critical 9.0 to 10.0. CVSS 2 has no Critical band: its High runs from 7.0 to 10.0. The vector lists how the flaw is reached (network, local), what an attacker needs (privileges, a user's click) and what it can harm.

Is CVE-2021-43809 exploited in the wild?

CISA KEV
Not listed (catalog 2026.11.30)
CISA SSVC
Exploitation: none; automatable: no; technical impact: partial (CISA ADP, November 2, 2026)
EPSS
3.06% probability of exploitation activity in the next 30 days, percentile 88.0 (FIRST EPSS, scores of December 2, 2026)

What kind of flaw is it?

Where are the vendor advisories and references?

When was it published, and where is the official record?

Reserved
November 16, 2021
Published
December 8, 2021, 18:50 UTC
CVE record updated
November 2, 2026, 18:14 UTC by GitHub_M
NVD
Modified, last modified November 2, 2026, 19:17 UTC
Last checked
CVE list November 19, 2026, 07:15 UTC; NVD November 19, 2026, 07:52 UTC; KEV December 3, 2026, 13:08 UTC; EPSS December 2, 2026
Official record
cve.org · NVD

What other CVEs affect rubygems?

Every CVE in rubygems

Questions about CVE-2021-43809

Is CVE-2021-43809 exploited in the wild?

Not as far as CISA knows: it is not in the Known Exploited Vulnerabilities catalog, read December 3, 2026, 13:08 UTC. FIRST's EPSS gives it a 3.06% chance of exploitation activity in the next 30 days (scores of December 2, 2026).

Which versions of rubygems are affected by CVE-2021-43809?

bundler before 2.2.33, per the GitHub advisory GHSA-fj7f-vq84-fh43. The tables above give every range the sources list.

Which version fixes CVE-2021-43809?

2.2.33, per the GitHub advisory GHSA-fj7f-vq84-fh43. Check the vendor's advisory before you rely on it.

How severe is CVE-2021-43809?

Medium (6.7, CVSS 3.1, from GitHub_M). The severity table above shows each score with its source.

Where is the official record of CVE-2021-43809?

The CVE Program's record is at cve.org and the NVD's at nvd.nist.gov. For a fix, the vendor's own advisory is the one to follow.