Uncontrolled search path in rubygem-bundler
Key facts
- Attack vector
- Local
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Code execution, Information disclosure
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Partial Red Hat: 4 fixed, 3 without a fix
Attack profile from CVSS 3.1 · NVD. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-427 and CWE-552.
Summary
Bundler prior to 2.1.0 uses a predictable path in /tmp/, created with insecure permissions as a storage location for gems, if locations under the user's home directory are not available. If Bundler is used in a scenario where the user does not have a writable home directory, an attacker could place malicious code in this directory that would be later loaded and executed.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | rubygem-bundler | bundler versions before 2.1.0 | — | No fix listed | CNA |
| — | bundler (RubyGems) | 1.14.0 to before 2.1.0 | 2.1.0 | Patch available | GHSA-g98m-96g9-wfjq |
- rubygem-bundler Vendor— Affected bundler versions before 2.1.0 Fixed in — No fix listed CNA
- bundler (RubyGems) Vendor— Affected 1.14.0 to before 2.1.0 Fixed in 2.1.0 Patch available GHSA-g98m-96g9-wfjq
Remediation
- Fix · GHSA-g98m-96g9-wfjq bundler (RubyGems) Fixed in 2.1.0 Advisory →
Red Hat 2 advisories
- RHSA-2021:2588 Released 2021-06-29 · Red Hat rating Moderateruby:2.6 security, bug fix, and enhancement update
- Red Hat Enterprise Linux AppStream (v. 8) ruby-2.6.7-107.module+el8.4.0+10830+bbd85cce.aarch64::ruby:2.6, ruby-2.6.7-107.module+el8.4.0+10830+bbd85cce.i686::ruby:2.6, ruby-2.6.7-107.module+el8.4.0+10830+bbd85cce.ppc64le::ruby:2.6 +47
- RHSA-2021:2230 Released 2021-06-03 · Red Hat rating Moderaterh-ruby26-ruby security, bug fix, and enhancement update
- Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 7) rh-ruby26-ruby-2.6.7-119.el7, rh-ruby26-ruby-devel-2.6.7-119.el7, rh-ruby26-ruby-doc-2.6.7-119.el7 +18
- Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.7) rh-ruby26-ruby-2.6.7-119.el7, rh-ruby26-ruby-devel-2.6.7-119.el7, rh-ruby26-ruby-doc-2.6.7-119.el7 +18
- Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 7) rh-ruby26-ruby-2.6.7-119.el7, rh-ruby26-ruby-devel-2.6.7-119.el7, rh-ruby26-ruby-doc-2.6.7-119.el7 +18
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat 3scale API Management Platform 2 | Affected | No fix yet |
| Red Hat Enterprise Linux 8 | Affected | No fix planned: Will not fix |
| Red Hat Software Collections | Affected | No fix planned: Will not fix |
| Red Hat Enterprise Linux AppStream (v. 8) | Fixed | RHSA-2021:2588 |
| Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 7) | Fixed | RHSA-2021:2230 |
| Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.7) | Fixed | RHSA-2021:2230 |
| Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 7) | Fixed | RHSA-2021:2230 |
Not affected: 4 products
- Red Hat Enterprise Linux 7
- Red Hat Software Collections
- Red Hat Storage 3
- Red Hat Subscription Asset Manager
Timeline
- 2026-10-02 Threatist record created from CVE-2019-3881
- 2026-10-03 Alias added: GHSA-g98m-96g9-wfjq
References
Advisory 2
More Bundler vulnerabilities
- TI-2016-06685 Bundler 1.x might allow remote attackers to inject arbitrary Ruby code into an… CVSS 3.0CRITICAL 9.8
- TI-2020-18610 Bundler 1.16.0 through 2.2.9 and 2.2.11 through 2.2.16 sometimes chooses a dependency… CVSS 3.1HIGH 8.8
- TI-2021-19615 Local Code Execution through Argument Injection via dash leading git url parameter in Gemfile CVSS 3.1HIGH 7.3
- TI-2013-00264 Bundler before 1.7, when multiple top-level source lines are used, allows remote… CVSS 2.0MEDIUM 5.0
Sources
- CVE-2019-3881 · CVE Program
- CVE-2019-3881 · NVD
- FIRST EPSS
- GHSA-g98m-96g9-wfjq · GitHub Advisory Database · CC BY 4.0
- CVE-2019-3881 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences