# CVE-2019-3881: Insecure path handling in Bundler

- Severity: High 7.8 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.53%, higher than 46% of CVEs (2026-12-01)
- Published: 2020-09-04T00:00:00.000Z
- Modified: 2026-06-17T02:35:47.860Z
- Also known as: GHSA-g98m-96g9-wfjq
- Weaknesses: CWE-427, CWE-552
- Assigned by: redhat

## Description

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.

(As written by CVE List.)

## Affected

- rubygem-bundler: bundler versions before 2.1.0
- bundler (RubyGems): from 1.14.0 before 2.1.0
- bundler bundler: before 2.1.0

## Every score

- GitHub: CVSS:3.1 7.0 High `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 4.4 Medium `AV:L/AC:M/Au:N/C:P/I:P/A:P`

## References

- <https://bugzilla.redhat.com/show_bug.cgi?id=1651826> (issue-tracking, patch, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2019-3881> (advisory)
- <https://github.com/rubygems/bundler/issues/6501> (web)
- <https://github.com/rubygems/bundler/pull/7416/commits/65cfebb041c454c246aaf32a177b0243915a9998> (web)
- <https://github.com/advisories/GHSA-g98m-96g9-wfjq> (advisory)
- <https://github.com/rubygems/bundler> (package)
- <https://github.com/rubysec/ruby-advisory-db/blob/master/gems/bundler/CVE-2019-3881.yml> (web)

## Sources

- CVE List: [CVE-2019-3881](https://www.cve.org/CVERecord?id=CVE-2019-3881), CVE Terms of Use, modified 2024-08-04
- GitHub Advisory Database: [GHSA-g98m-96g9-wfjq](https://github.com/advisories/GHSA-g98m-96g9-wfjq), CC-BY-4.0, modified 2024-02-16
- NVD: [CVE-2019-3881](https://nvd.nist.gov/vuln/detail/CVE-2019-3881), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2019-3881 · Whole record: https://cve.day/CVE-2019-3881.json · Rebuilt by cve.day 2026-11-25T22:57:49.996Z
