CVE-2018-8780: In Ruby before 2.2.10, 2.3.x before 2.3.7, 2.4.x before 2.4.4, 2.5.x before 2.5.1, and 2.6.0-preview1, the Dir.open, Dir.new, Dir.entries and Dir.empty?
Critical CVSS 9.1
- CVE id
- CVE-2018-8780
- Published
- Last modified
Affected packages
| Package | Affected versions | Fixed in |
|---|---|---|
| Ruby Runtimes and servers |
< 2.2.10 >= 2.3.0, < 2.3.7 >= 2.4.0, < 2.4.4 >= 2.5.0, < 2.5.1 |
2.2.10, 2.3.7, 2.4.4, 2.5.1 |
How to fix it
Upgrade Ruby to the fixed release of the line you run: 2.2.10, 2.3.7, 2.4.4, 2.5.1.
ruby --version
- Install the patched Ruby release of your minor line (rbenv, the ruby image tag) and update .ruby-version.
A free AIssue account reads the runtime versions your repositories pin (version files, Dockerfiles, build files) and tells you when one is affected.
Details
In Ruby before 2.2.10, 2.3.x before 2.3.7, 2.4.x before 2.4.4, 2.5.x before 2.5.1, and 2.6.0-preview1, the Dir.open, Dir.new, Dir.entries and Dir.empty? methods do not check NULL characters. When using the corresponding method, unintentional directory traversal may be performed.
References
- CVE-2018-8780 on the NVD
- Advisory: https://nvd.nist.gov/vuln/detail/CVE-2018-8780
- Web: https://access.redhat.com/errata/RHSA-2018:3729
- Web: https://access.redhat.com/errata/RHSA-2018:3730
- Web: https://access.redhat.com/errata/RHSA-2018:3731
- Web: https://access.redhat.com/errata/RHSA-2019:2028
- Web: https://access.redhat.com/errata/RHSA-2020:0542
- Web: https://access.redhat.com/errata/RHSA-2020:0591
- Web: https://access.redhat.com/errata/RHSA-2020:0663
- Web: https://lists.debian.org/debian-lts-announce/2018/04/msg00023.html
- Web: https://lists.debian.org/debian-lts-announce/2018/04/msg00024.html
- Web: https://lists.debian.org/debian-lts-announce/2018/07/msg00012.html
- Web: https://usn.ubuntu.com/3626-1/
- Web: https://www.debian.org/security/2018/dsa-4259
- Web: https://www.ruby-lang.org/en/news/2018/03/28/poisoned-nul-byte-dir-cve-2018-8780/
- Web: https://www.ruby-lang.org/en/news/2018/03/28/ruby-2-2-10-released/
- Web: https://www.ruby-lang.org/en/news/2018/03/28/ruby-2-3-7-released/
- Web: https://www.ruby-lang.org/en/news/2018/03/28/ruby-2-4-4-released/
- Web: https://www.ruby-lang.org/en/news/2018/03/28/ruby-2-5-1-released/
- Web: https://access.redhat.com/errata/RHSA-2018:3729
- Web: https://access.redhat.com/errata/RHSA-2018:3730
Am I affected?
Upload or paste your lockfile. We check every package version in it against OSV.dev, this advisory included, and email you the vulnerable ones with the version that fixes them. Free, and no account needed.
About this data
Source: National Vulnerability Database (NVD) (public domain). Severity comes from the advisory's own rating when it has one, else from its CVSS score.