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.
- Published
- Dec 8, 2021
- Updated
- Jun 17, 2026
- EPSS
- 2.9% · 86th percentile
- CWE
- CWE-88
Report tools
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.
Running WordPress? Scan your site free with WP Lens
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 helpAffected 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.
| Vendor | Product | CPE |
|---|---|---|
| bundler | bundler | cpe:2.3:a:bundler:bundler |
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.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| AlmaLinux:8 | ruby | before 2.5.9-114.module_el8.10.0+3991+5e651d4e | 2.5.9-114.module_el8.10.0+3991+5e651d4e |
| AlmaLinux:8 | ruby-devel | before 2.5.9-114.module_el8.10.0+3991+5e651d4e | 2.5.9-114.module_el8.10.0+3991+5e651d4e |
| AlmaLinux:8 | ruby-doc | before 2.5.9-114.module_el8.10.0+3991+5e651d4e | 2.5.9-114.module_el8.10.0+3991+5e651d4e |
| AlmaLinux:8 | ruby-irb | before 2.5.9-114.module_el8.10.0+3991+5e651d4e | 2.5.9-114.module_el8.10.0+3991+5e651d4e |
| AlmaLinux:8 | ruby-libs | before 2.5.9-114.module_el8.10.0+3991+5e651d4e | 2.5.9-114.module_el8.10.0+3991+5e651d4e |
| AlmaLinux:8 | rubygem-abrt | before 0.3.0-4.module_el8.5.0+2625+ec418553 | 0.3.0-4.module_el8.5.0+2625+ec418553 |
| AlmaLinux:8 | rubygem-abrt-doc | before 0.3.0-4.module_el8.10.0+3871+342e2c2f | 0.3.0-4.module_el8.10.0+3871+342e2c2f |
| AlmaLinux:8 | rubygem-bigdecimal | before 1.3.4-114.module_el8.10.0+3991+5e651d4e | 1.3.4-114.module_el8.10.0+3991+5e651d4e |
| AlmaLinux:8 | rubygem-bson | before 4.3.0-2.module_el8.5.0+2625+ec418553 | 4.3.0-2.module_el8.5.0+2625+ec418553 |
| AlmaLinux:8 | rubygem-bson | before 4.3.0-2.module_el8.6.0+3170+4b08f9d4 | 4.3.0-2.module_el8.6.0+3170+4b08f9d4 |
| AlmaLinux:8 | rubygem-bson | before 4.3.0-2.module_el8.5.0+259+8cec6917 | 4.3.0-2.module_el8.5.0+259+8cec6917 |
| AlmaLinux:8 | rubygem-bson-doc | before 4.3.0-2.module_el8.5.0+2625+ec418553 | 4.3.0-2.module_el8.5.0+2625+ec418553 |
| AlmaLinux:8 | rubygem-bundler | before 1.16.1-5.module_el8.10.0+3991+5e651d4e | 1.16.1-5.module_el8.10.0+3991+5e651d4e |
| AlmaLinux:8 | rubygem-bundler-doc | before 1.16.1-5.module_el8.10.0+3991+5e651d4e | 1.16.1-5.module_el8.10.0+3991+5e651d4e |
| AlmaLinux:8 | rubygem-did_you_mean | before 1.2.0-114.module_el8.10.0+3991+5e651d4e | 1.2.0-114.module_el8.10.0+3991+5e651d4e |
| AlmaLinux:8 | rubygem-io-console | before 0.4.6-114.module_el8.10.0+3991+5e651d4e | 0.4.6-114.module_el8.10.0+3991+5e651d4e |
| AlmaLinux:8 | rubygem-json | before 2.1.0-114.module_el8.10.0+3991+5e651d4e | 2.1.0-114.module_el8.10.0+3991+5e651d4e |
| AlmaLinux:8 | rubygem-minitest | before 5.10.3-114.module_el8.10.0+3991+5e651d4e | 5.10.3-114.module_el8.10.0+3991+5e651d4e |
| AlmaLinux:8 | rubygem-mongo | before 2.5.1-2.module_el8.5.0+2625+ec418553 | 2.5.1-2.module_el8.5.0+2625+ec418553 |
| AlmaLinux:8 | rubygem-mongo-doc | before 2.5.1-2.module_el8.5.0+2625+ec418553 | 2.5.1-2.module_el8.5.0+2625+ec418553 |
| AlmaLinux:8 | rubygem-mysql2 | before 0.4.10-4.module_el8.5.0+259+8cec6917 | 0.4.10-4.module_el8.5.0+259+8cec6917 |
| AlmaLinux:8 | rubygem-mysql2 | before 0.4.10-4.module_el8.5.0+2625+ec418553 | 0.4.10-4.module_el8.5.0+2625+ec418553 |
| AlmaLinux:8 | rubygem-mysql2 | before 0.4.10-4.module_el8.6.0+3170+4b08f9d4 | 0.4.10-4.module_el8.6.0+3170+4b08f9d4 |
| AlmaLinux:8 | rubygem-mysql2-doc | before 0.4.10-4.module_el8.5.0+2625+ec418553 | 0.4.10-4.module_el8.5.0+2625+ec418553 |
+73
Same product
bundler: all recordsOther 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 secondary42Plan
- 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 unde31Monitor
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 / package | Fixed version | Source |
|---|---|---|
| almalinux:ruby | 2.5.9-114.module_el8.10.0+3991+5e651d4e · AlmaLinux:8 | Package registry (OSV) |
| almalinux:ruby-devel | 2.5.9-114.module_el8.10.0+3991+5e651d4e · AlmaLinux:8 | Package registry (OSV) |
| almalinux:ruby-doc | 2.5.9-114.module_el8.10.0+3991+5e651d4e · AlmaLinux:8 | Package registry (OSV) |
| almalinux:ruby-irb | 2.5.9-114.module_el8.10.0+3991+5e651d4e · AlmaLinux:8 | Package registry (OSV) |
| almalinux:ruby-libs | 2.5.9-114.module_el8.10.0+3991+5e651d4e · AlmaLinux:8 | Package registry (OSV) |
| almalinux:rubygem-abrt | 0.3.0-4.module_el8.5.0+2625+ec418553 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:rubygem-abrt-doc | 0.3.0-4.module_el8.10.0+3871+342e2c2f · AlmaLinux:8 | Package registry (OSV) |
| almalinux:rubygem-bigdecimal | 1.3.4-114.module_el8.10.0+3991+5e651d4e · AlmaLinux:8 | Package registry (OSV) |
| almalinux:rubygem-bson | 4.3.0-2.module_el8.5.0+2625+ec418553 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:rubygem-bson-doc | 4.3.0-2.module_el8.5.0+2625+ec418553 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:rubygem-bundler | 1.16.1-5.module_el8.10.0+3991+5e651d4e · AlmaLinux:8 | Package registry (OSV) |
| almalinux:rubygem-bundler-doc | 1.16.1-5.module_el8.10.0+3991+5e651d4e · AlmaLinux:8 | Package registry (OSV) |
| alpine:ruby-bundler | 2.2.33-r0 · Alpine:v3.15 | Package registry (OSV) |
| debian:rubygems | 3.3.5-1 · Debian:12 | Package registry (OSV) |
| opensuse:rubygem-bundler | 1.16.1-150000.3.6.1 · openSUSE:Leap 15.5 | Package registry (OSV) |
| red hat:ruby | 0:2.5.9-114.module+el8.10.0+23088+750dc6ca · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:ruby-debuginfo | 0:2.5.9-114.module+el8.10.0+23088+750dc6ca · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:ruby-debugsource | 0:2.5.9-114.module+el8.10.0+23088+750dc6ca · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:ruby-devel | 0:2.5.9-114.module+el8.10.0+23088+750dc6ca · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:ruby-doc | 0:2.5.9-114.module+el8.10.0+23088+750dc6ca · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:ruby-irb | 0:2.5.9-114.module+el8.10.0+23088+750dc6ca · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:ruby-libs | 0:2.5.9-114.module+el8.10.0+23088+750dc6ca · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:ruby-libs-debuginfo | 0:2.5.9-114.module+el8.10.0+23088+750dc6ca · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:rubygem-abrt | 0:0.3.0-4.module+el8.10.0+22021+135c76a8 · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:rubygem-abrt-doc | 0:0.3.0-4.module+el8.10.0+22021+135c76a8 · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:rubygem-bigdecimal | 0:1.3.4-114.module+el8.10.0+23088+750dc6ca · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:rubygem-bigdecimal-debuginfo | 0:1.3.4-114.module+el8.10.0+23088+750dc6ca · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| rocky linux:ruby | 0:2.5.9-114.module+el8.10.0+1979+815637df · Rocky Linux:8 | Package registry (OSV) |
| rocky linux:rubygem-abrt | 0:0.3.0-4.module+el8.5.0+738+032c9c02 · Rocky Linux:8 | Package registry (OSV) |
| rocky linux:rubygem-bson | 0:4.3.0-2.module+el8.9.0+1536+5f79634e · Rocky Linux:8 | Package 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.
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.
Credits
All researchersFinders, 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
Weakness class (CWE)
CWE-88 · Improper Neutralization of Argument Delimiters in a Command ('Argument Injection')CVSS vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
nvd-primary
Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
Attack patterns (CAPEC)
- Parameter InjectionCAPEC-137likelihood: Medium · Medium
- Flash Parameter InjectionCAPEC-174likelihood: High · Medium
- Using Meta-characters in E-mail Headers to Inject Malicious PayloadsCAPEC-41likelihood: High · High
- HTTP Parameter Pollution (HPP)CAPEC-460Medium
- OS Command InjectionCAPEC-88likelihood: High · High
ATT&CK techniques
—
Change log
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
Show all references (3 more)Show less
Vendor advisories and official records. Exploit/PoC links are deliberately left out.