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.
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?
| Vendor | Product | Affected | Fixed or not affected from |
|---|---|---|---|
| rubygems | rubygems | < 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?
| Ecosystem | Package | Affected | Fixed in | Advisory |
|---|---|---|---|---|
| RubyGems | bundler | < 2.2.33 | 2.2.33 | GHSA-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?
| Vendor | Product | Versions | Type |
|---|---|---|---|
| bundler | bundler | before 2.2.33 | application |
NVD analysis (status Modified), last modified November 2, 2026, 19:17 UTC.
How severe is CVE-2021-43809?
| Score | Version | Vector | Source |
|---|---|---|---|
| Medium 6.7 | CVSS 3.1 | CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H | GitHub_M |
| High 7.3 | CVSS 3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H | NVD |
| High 9.3 | CVSS 2.0 | AV:N/AC:M/Au:N/C:C/I:C/A:C | NVD |
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?
- CWE-88 Improper Neutralization of Argument Delimiters in a Command
Where are the vendor advisories and references?
- https://github.com/rubygems/rubygems/security/advisories/GHSA-fj7f-vq84-fh43 x_refsource_CONFIRM
- https://github.com/rubygems/rubygems/pull/5142 x_refsource_MISC
- https://github.com/rubygems/rubygems/commit/0fad1ccfe9dd7a3c5b82c1496df3c2b4842870d3 x_refsource_MISC
- https://github.com/rubygems/rubygems/commit/a4f2f8ac17e6ce81c689527a8b6f14381060d95f x_refsource_MISC
- https://www.sonarsource.com/blog/securing-developer-tools-package-managers/ x_refsource_MISC
- https://lists.debian.org/debian-lts-announce/2025/05/msg00015.html
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?
- Jun 17, 2019CVE-2019-8321 Rubygems: argument injection
- Jun 17, 2019CVE-2019-8322 Rubygems: injection
- Jun 17, 2019CVE-2019-8323 Rubygems: injection
- Jun 17, 2019CVE-2019-8325 Rubygems: injection
- Jun 17, 2019CVE-2019-8324 Rubygems: code injection (remote code execution)
- Jun 6, 2019CVE-2019-8320 Rubygems: path traversal (reading or writing files outside the intended folder)
- Mar 13, 2018CVE-2018-1000079 Rubygems: path traversal (reading or writing files outside the intended folder)
- Mar 13, 2018CVE-2018-1000078 Rubygems: cross-site scripting (XSS)
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.