CVE-2019-3881 json
Insecure path handling in Bundler
published 2020-09-04 6 y ago modified 2026-06-17 4 mo ago also GHSA-g98m-96g9-wfjq , EUVD-2021-1077
- cvss
- 7.8
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.5%
- EPSS 0.5% chance of exploitation in 30 days, percentile 45%
- public exploits
- 0
- none known
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.
Patch / fix
- rubygems bundler 2.1.0
- bundler bundler 2.1.0
- bundler Ubuntu Pro 18.04 LTS 1.16.1-1ubuntu0.1~esm1
ubuntu advisories UBUNTU-CVE-2019-3881
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- ruby RHEL 8 2.6.7-107.module+el8.4.0+10830+bbd85cce
- rubygems RHEL 8 3.0.3.1-107.module+el8.4.0+10830+bbd85cce
- ruby-libs RHEL 8 2.6.7-107.module+el8.4.0+10830+bbd85cce
- rubygem-pg RHEL 8 1.1.4-1.module+el8.1.0+3653+beb38eb0
- rubygem-irb RHEL 8 1.0.0-107.module+el8.4.0+10830+bbd85cce
- rubygem-abrt RHEL 8 0.3.0-4.module+el8.1.0+3653+beb38eb0
- rubygem-bson RHEL 8 4.5.0-1.module+el8.1.0+3653+beb38eb0
- rubygem-json RHEL 8 2.1.0-107.module+el8.4.0+10830+bbd85cce
red hat advisories RHSA-2021:2588RHSA-2021:2230
- rubygem-bundler SLE Module for Basesystem 15 SP2, SLE Module for Basesystem 15 SP1 1.16.1-3.3.1
suse advisories SUSE-SU-2020:1582-2SUSE-SU-2020:1582-1
- rubygem-bundler openSUSE Leap 15.2 1.16.1-lp152.4.3.1
- rubygem-bundler openSUSE Leap 15.1 1.16.1-lp151.3.3.1
opensuse advisories openSUSE-SU-2020:0861-1openSUSE-SU-2020:0803-1
- rubygem-pg AlmaLinux 8 1.1.4-1.module_el8.5.0+250+ba22dbf7
- rubygem-pg AlmaLinux 8 1.1.4-1.module_el8.5.0+2623+08a8ba32
- rubygem-abrt AlmaLinux 8 0.3.0-4.module_el8.5.0+259+8cec6917
- rubygem-abrt AlmaLinux 8 0.3.0-4.module_el8.5.0+2623+08a8ba32
- rubygem-bson AlmaLinux 8 4.5.0-1.module_el8.5.0+2623+08a8ba32
- rubygem-bson AlmaLinux 8 4.5.0-1.module_el8.5.0+250+ba22dbf7
- rubygem-mongo AlmaLinux 8 2.8.0-1.module_el8.5.0+250+ba22dbf7
- rubygem-mongo AlmaLinux 8 2.8.0-1.module_el8.5.0+2623+08a8ba32
almalinux advisories ALSA-2021:2588
- ruby Rocky Linux 8 2.6.7-107.module+el8.4.0+593+8d7f9f0c
- rubygem-pg Rocky Linux 8 1.1.4-1.module+el8.5.0+738+032c9c02
- rubygem-pg Rocky Linux 8 1.1.4-1.module+el8.4.0+446+80b53620
- rubygem-pg Rocky Linux 8 1.1.4-1.module+el8.4.0+593+8d7f9f0c
- rubygem-abrt Rocky Linux 8 0.3.0-4.module+el8.5.0+738+032c9c02
- rubygem-abrt Rocky Linux 8 0.3.0-4.module+el8.3.0+167+5c390590
- rubygem-abrt Rocky Linux 8 0.3.0-4.module+el8.4.0+592+03ff458a
- rubygem-bson Rocky Linux 8 4.5.0-1.module+el8.4.0+593+8d7f9f0c
rocky linux advisories RLSA-2021:2588
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2019-3881 updated cvss 6.7
rubygem-bundler: Insecure permissions on directory in /tmp/ allows for execution of malicious code
-
Red Hat 3scale API Management Platform 2 backendaffected: no fix available
-
Red Hat Enterprise Linux 8 rubygem-bundler Red Hat Software Collections rh-ruby25-rubygem-bundleraffected: no fix planned “Will not fix”
-
Red Hat Enterprise Linux AppStream (v. 8) ruby 2.6.7-107.module+el8.4.0+10830+bbd85cce, rubygem-pg 1.1.4-1.module+el8.1.0+3653+beb38eb0, ruby-libs 2.6.7-107.module+el8.4.0+10830+bbd85cce, rubygem-abrt 0.3.0-4.module+el8.1.0+3653+beb38eb0, rubygem-bson 4.5.0-1.module+el8.1.0+3653+beb38eb0, rubygem-mongo 2.8.0-1.module+el8.1.0+3653+beb38eb0, +17 morefixed: vendor fix RHSA-2021:2588
-
Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 7) rh-ruby26-ruby 2.6.7-119.el7, rh-ruby26-ruby-libs 2.6.7-119.el7, rh-ruby26-rubygems 3.0.3.1-119.el7, rh-ruby26-rubygem-irb 1.0.0-119.el7, rh-ruby26-rubygem-json 2.1.0-119.el7, rh-ruby26-rubygem-rdoc 6.1.2-119.el7, +12 more 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-libs 2.6.7-119.el7, rh-ruby26-rubygems 3.0.3.1-119.el7, rh-ruby26-rubygem-irb 1.0.0-119.el7, rh-ruby26-rubygem-json 2.1.0-119.el7, rh-ruby26-rubygem-rdoc 6.1.2-119.el7, +12 more Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 7) rh-ruby26-ruby 2.6.7-119.el7, rh-ruby26-ruby-libs 2.6.7-119.el7, rh-ruby26-rubygems 3.0.3.1-119.el7, rh-ruby26-rubygem-irb 1.0.0-119.el7, rh-ruby26-rubygem-json 2.1.0-119.el7, rh-ruby26-rubygem-rdoc 6.1.2-119.el7, +12 morefixed: vendor fix RHSA-2021:2230
-
Red Hat Enterprise Linux 7 rubygem-bundler Red Hat Software Collections rh-ruby27-ruby, rh-ruby27-rubygems, rh-ruby27-ruby-libs, rh-ruby27-rubygem-irb, rh-ruby27-rubygem-json, rh-ruby27-rubygem-racc, +15 more Red Hat Storage 3 rubygem-bundler Red Hat Subscription Asset Manager rubygem-bundler, ruby193-rubygem-bundlernot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
0.53% chance of exploitation in the next 30 days, higher than 45% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| NVD | 2.0 | 4.4 | AV:L/AC:M/Au:N/C:P/I:P/A:P |
| GitHub | 3.1 | 7.0 | CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| rubygems | bundler | >=1.14.0, <2.1.0 |
2.1.0 |
Affected products
- n/a rubygem-bundler
Classification
References
-
bugzilla.redhat.com
/show_bug.cgi?id=1651826
web, issue-tracking, patch, third-party-advisory
-
github.com
/rubygems/bundler/pull/7416/commits/65cfebb041c454c246aaf32a177b0243915a9998
web
-
nvd.nist.gov
/vuln/detail/CVE-2019-3881
advisory
-
github.com
/rubygems/bundler/issues/6501
web
-
github.com
/advisories/GHSA-g98m-96g9-wfjq
advisory
-
github.com
/rubygems/bundler
package
-
github.com
/rubysec/ruby-advisory-db/blob/master/gems/bundler/CVE-2019-3881.yml
web
Sources
- CVE List CVE-2019-3881
- GitHub Advisory GHSA-g98m-96g9-wfjq
- NVD CVE-2019-3881
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.