Skip to content
Noroxi
CVE-2021-43809· NVD / CVE Program· CNA GitHub_M

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

Noroxi assessment

Priority: Monitor (action score 30/100)

  • The sources we track (CISA KEV, Exploit-DB, Metasploit, Nuclei, GitHub) show no public exploit code or exploitation in the wild.
  • Probability of exploitation in the next 30 days: 2.9% (FIRST EPSS); higher than 86.9% of all records.
  • Someone with local access to the system can trigger it. A low-privileged account is enough. A user must open a link or visit a page. No special conditions are required; it is repeatable.
  • Fixed version: ruby (AlmaLinux:8) 2.5.9-114.module_el8.10.0+3991+5e651d4e; ruby-devel (AlmaLinux:8) 2.5.9-114.module_el8.10.0+3991+5e651d4e; ruby-doc (AlmaLinux:8) 2.5.9-114.module_el8.10.0+3991+5e651d4e.

Low priority for now. Upgrade to ruby (AlmaLinux:8) 2.5.9-114.module_el8.10.0+3991+5e651d4e; ruby-devel (AlmaLinux:8) 2.5.9-114.module_el8.10.0+3991+5e651d4e; ruby-doc (AlmaLinux:8) 2.5.9-114.module_el8.10.0+3991+5e651d4e or later.

Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it

Primary sources: NVD · CVE.org · FIRST EPSS

`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.

HighCVSS 7.3 · v3.1—No exploit Fix available
Published
Dec 8, 2021
Updated
Jun 17, 2026
EPSS
2.9% · 86th percentile

Report tools

JSON

Action score

30

Monitor

Low priority for now.

CVSS
29 / 40 · 7.3 / 10
CISA KEV
0 / 30 · Not listed
EPSS
1 / 30 · 2.9%

CNA vs NVD score

NVD
7.3
CNA · GitHub_M
6.7
0.6 point gap

CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H

The score given by the assigning authority versus NVD’s independent score. A gap means the severity is contested.

Get told when this record changes

  • Not in KEV: no record of exploitation in the wild
  • No public exploit code on record
  • A fix has been released

If any of these changes, we'll tell you in the daily email digest.

Follow CVE-2021-43809

When you'll hear from us

  • when it enters CISA KEV
  • when exploit code appears or is weaponized
  • when the record is updated (including a fixed version)
  • when EPSS rises 20 points in a week

One daily email digest (06:00 UTC); connect a webhook for KEV listings and weaponized exploits instantly.

Your free account also gets you

Running WordPress? Scan your site free with WP Lens

  • Stack alerts: add the products and versions you run, get the new CVEs that affect them
  • Uptime monitoring: 1 site, instant email when it goes down
  • Add your domain: subdomains and takeover risk scanned every week (1 domain)
  • 10 scans an hour on the security tools (3 a day without an account), an API key and MCP
  • All your scans in one panel: findings, what changed in the last scan, a report per domain or per client (PDF, share link)
All free tools

Sign up with email · Have an account? Sign in

Free account, no card. Unfollow any time.

Running WordPress? Scan your site free with WP Lens

Is your version affected? Check it

Noroxi analysis

What does it mean in your environment?

The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.

We use this product, ask for help

Affected systems

Is your version affected?

Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.

VendorProduct
bundlerbundler

Affected versions

NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.

  • bundler bundlerbefore 2.2.33

Versions reported by the vendor

Affected version ranges reported by the assigning authority (GitHub_M). Independent of NVD's CPE analysis and usually ahead of it.

  • rubygems rubygems

    • < 2.2.33affected

Package-level exposure

OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.

EcosystemPackageAffected rangeFix
AlmaLinux:8rubybefore 2.5.9-114.module_el8.10.0+3991+5e651d4e2.5.9-114.module_el8.10.0+3991+5e651d4e
AlmaLinux:8ruby-develbefore 2.5.9-114.module_el8.10.0+3991+5e651d4e2.5.9-114.module_el8.10.0+3991+5e651d4e
AlmaLinux:8ruby-docbefore 2.5.9-114.module_el8.10.0+3991+5e651d4e2.5.9-114.module_el8.10.0+3991+5e651d4e
AlmaLinux:8ruby-irbbefore 2.5.9-114.module_el8.10.0+3991+5e651d4e2.5.9-114.module_el8.10.0+3991+5e651d4e
AlmaLinux:8ruby-libsbefore 2.5.9-114.module_el8.10.0+3991+5e651d4e2.5.9-114.module_el8.10.0+3991+5e651d4e
AlmaLinux:8rubygem-abrtbefore 0.3.0-4.module_el8.5.0+2625+ec4185530.3.0-4.module_el8.5.0+2625+ec418553
AlmaLinux:8rubygem-abrt-docbefore 0.3.0-4.module_el8.10.0+3871+342e2c2f0.3.0-4.module_el8.10.0+3871+342e2c2f
AlmaLinux:8rubygem-bigdecimalbefore 1.3.4-114.module_el8.10.0+3991+5e651d4e1.3.4-114.module_el8.10.0+3991+5e651d4e
AlmaLinux:8rubygem-bsonbefore 4.3.0-2.module_el8.5.0+2625+ec4185534.3.0-2.module_el8.5.0+2625+ec418553
AlmaLinux:8rubygem-bsonbefore 4.3.0-2.module_el8.6.0+3170+4b08f9d44.3.0-2.module_el8.6.0+3170+4b08f9d4
AlmaLinux:8rubygem-bsonbefore 4.3.0-2.module_el8.5.0+259+8cec69174.3.0-2.module_el8.5.0+259+8cec6917
AlmaLinux:8rubygem-bson-docbefore 4.3.0-2.module_el8.5.0+2625+ec4185534.3.0-2.module_el8.5.0+2625+ec418553
AlmaLinux:8rubygem-bundlerbefore 1.16.1-5.module_el8.10.0+3991+5e651d4e1.16.1-5.module_el8.10.0+3991+5e651d4e
AlmaLinux:8rubygem-bundler-docbefore 1.16.1-5.module_el8.10.0+3991+5e651d4e1.16.1-5.module_el8.10.0+3991+5e651d4e
AlmaLinux:8rubygem-did_you_meanbefore 1.2.0-114.module_el8.10.0+3991+5e651d4e1.2.0-114.module_el8.10.0+3991+5e651d4e
AlmaLinux:8rubygem-io-consolebefore 0.4.6-114.module_el8.10.0+3991+5e651d4e0.4.6-114.module_el8.10.0+3991+5e651d4e
AlmaLinux:8rubygem-jsonbefore 2.1.0-114.module_el8.10.0+3991+5e651d4e2.1.0-114.module_el8.10.0+3991+5e651d4e
AlmaLinux:8rubygem-minitestbefore 5.10.3-114.module_el8.10.0+3991+5e651d4e5.10.3-114.module_el8.10.0+3991+5e651d4e
AlmaLinux:8rubygem-mongobefore 2.5.1-2.module_el8.5.0+2625+ec4185532.5.1-2.module_el8.5.0+2625+ec418553
AlmaLinux:8rubygem-mongo-docbefore 2.5.1-2.module_el8.5.0+2625+ec4185532.5.1-2.module_el8.5.0+2625+ec418553
AlmaLinux:8rubygem-mysql2before 0.4.10-4.module_el8.5.0+259+8cec69170.4.10-4.module_el8.5.0+259+8cec6917
AlmaLinux:8rubygem-mysql2before 0.4.10-4.module_el8.5.0+2625+ec4185530.4.10-4.module_el8.5.0+2625+ec418553
AlmaLinux:8rubygem-mysql2before 0.4.10-4.module_el8.6.0+3170+4b08f9d40.4.10-4.module_el8.6.0+3170+4b08f9d4
AlmaLinux:8rubygem-mysql2-docbefore 0.4.10-4.module_el8.5.0+2625+ec4185530.4.10-4.module_el8.5.0+2625+ec418553

+73

Other highest-scoring records for the same primary product.

  • CVE-2016-7954Bundler 1.x might allow remote attackers to inject arbitrary Ruby code into an application by leveraging a gem name collision on a secondary
    42Plan
  • CVE-2020-36327Bundler 1.16.0 through 2.2.9 and 2.2.11 through 2.2.16 sometimes chooses a dependency source based on the highest gem version number, which
    37Monitor
  • CVE-2019-3881Bundler prior to 2.1.0 uses a predictable path in /tmp/, created with insecure permissions as a storage location for gems, if locations unde
    31Monitor

Published before and after this one in the same product

  • ← EarlierCVE-2013-0334Oct 31, 2014 · Bundler before 1.7, when multiple top-level source lines are used, allows remote attackers to install arbitrary gems by creating a gem with
    21Monitor

Remediation

Which version to upgrade to

Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.

Product / packageFixed versionSource
almalinux:ruby2.5.9-114.module_el8.10.0+3991+5e651d4e · AlmaLinux:8Package registry (OSV)
almalinux:ruby-devel2.5.9-114.module_el8.10.0+3991+5e651d4e · AlmaLinux:8Package registry (OSV)
almalinux:ruby-doc2.5.9-114.module_el8.10.0+3991+5e651d4e · AlmaLinux:8Package registry (OSV)
almalinux:ruby-irb2.5.9-114.module_el8.10.0+3991+5e651d4e · AlmaLinux:8Package registry (OSV)
almalinux:ruby-libs2.5.9-114.module_el8.10.0+3991+5e651d4e · AlmaLinux:8Package registry (OSV)
almalinux:rubygem-abrt0.3.0-4.module_el8.5.0+2625+ec418553 · AlmaLinux:8Package registry (OSV)
almalinux:rubygem-abrt-doc0.3.0-4.module_el8.10.0+3871+342e2c2f · AlmaLinux:8Package registry (OSV)
almalinux:rubygem-bigdecimal1.3.4-114.module_el8.10.0+3991+5e651d4e · AlmaLinux:8Package registry (OSV)
almalinux:rubygem-bson4.3.0-2.module_el8.5.0+2625+ec418553 · AlmaLinux:8Package registry (OSV)
almalinux:rubygem-bson-doc4.3.0-2.module_el8.5.0+2625+ec418553 · AlmaLinux:8Package registry (OSV)
almalinux:rubygem-bundler1.16.1-5.module_el8.10.0+3991+5e651d4e · AlmaLinux:8Package registry (OSV)
almalinux:rubygem-bundler-doc1.16.1-5.module_el8.10.0+3991+5e651d4e · AlmaLinux:8Package registry (OSV)
alpine:ruby-bundler2.2.33-r0 · Alpine:v3.15Package registry (OSV)
debian:rubygems3.3.5-1 · Debian:12Package registry (OSV)
opensuse:rubygem-bundler1.16.1-150000.3.6.1 · openSUSE:Leap 15.5Package registry (OSV)
red hat:ruby0:2.5.9-114.module+el8.10.0+23088+750dc6ca · Red Hat:enterprise_linux:8::appstreamPackage registry (OSV)
red hat:ruby-debuginfo0:2.5.9-114.module+el8.10.0+23088+750dc6ca · Red Hat:enterprise_linux:8::appstreamPackage registry (OSV)
red hat:ruby-debugsource0:2.5.9-114.module+el8.10.0+23088+750dc6ca · Red Hat:enterprise_linux:8::appstreamPackage registry (OSV)
red hat:ruby-devel0:2.5.9-114.module+el8.10.0+23088+750dc6ca · Red Hat:enterprise_linux:8::appstreamPackage registry (OSV)
red hat:ruby-doc0:2.5.9-114.module+el8.10.0+23088+750dc6ca · Red Hat:enterprise_linux:8::appstreamPackage registry (OSV)
red hat:ruby-irb0:2.5.9-114.module+el8.10.0+23088+750dc6ca · Red Hat:enterprise_linux:8::appstreamPackage registry (OSV)
red hat:ruby-libs0:2.5.9-114.module+el8.10.0+23088+750dc6ca · Red Hat:enterprise_linux:8::appstreamPackage registry (OSV)
red hat:ruby-libs-debuginfo0:2.5.9-114.module+el8.10.0+23088+750dc6ca · Red Hat:enterprise_linux:8::appstreamPackage registry (OSV)
red hat:rubygem-abrt0:0.3.0-4.module+el8.10.0+22021+135c76a8 · Red Hat:enterprise_linux:8::appstreamPackage registry (OSV)
red hat:rubygem-abrt-doc0:0.3.0-4.module+el8.10.0+22021+135c76a8 · Red Hat:enterprise_linux:8::appstreamPackage registry (OSV)
red hat:rubygem-bigdecimal0:1.3.4-114.module+el8.10.0+23088+750dc6ca · Red Hat:enterprise_linux:8::appstreamPackage registry (OSV)
red hat:rubygem-bigdecimal-debuginfo0:1.3.4-114.module+el8.10.0+23088+750dc6ca · Red Hat:enterprise_linux:8::appstreamPackage registry (OSV)
rocky linux:ruby0:2.5.9-114.module+el8.10.0+1979+815637df · Rocky Linux:8Package registry (OSV)
rocky linux:rubygem-abrt0:0.3.0-4.module+el8.5.0+738+032c9c02 · Rocky Linux:8Package registry (OSV)
rocky linux:rubygem-bson0:4.3.0-2.module+el8.9.0+1536+5f79634e · Rocky Linux:8Package registry (OSV)

+6

Exploit status

No known public exploit

No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.

Research context

For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.

Timeline

From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.

No dated events beyond publication.

EPSS, last 120 days

FIRST EPSS daily score; only changes of 0.01 or more are recorded (step chart).

Patch and commit links

Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.

Finders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.

No credits in the CNA record.

Variant candidates

Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.

No nightly-computed relations.

Chain candidates

An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.

—

Bug bounty scope

No known public program.

Source: bounty-targets-data (public HackerOne, Bugcrowd, Intigriti, YesWeHack listings).

Technical details

Attack conditions

  • Someone with local access to the system can trigger it.
  • A low-privileged account is enough.
  • A user must open a link or visit a page.
  • No special conditions are required; it is repeatable.

If successful

Confidentiality
high · data can be read
Integrity
high · data or configuration can be modified
Availability
high · the service can be disrupted
Attack vector
Local
Attack complexity
Low
Privileges required
Low
User interaction
Required
Scope
Unchanged
Confidentiality impact
High
Integrity impact
High
Availability impact
High

CVSS vector

CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H

nvd-primary

Change log

  1. Fix✗ → ✓

For records you follow, these changes also arrive as notifications. →

References

All records