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?

published April 3, 2018

CVSS
—
EPSS
10%
Percentile
95.6
In the wild
Unconfirmed
What it is

⚠️ A sneaky oversight in Ruby could let a crafty user peek into unintended directories without a second thought! Think of it like a restaurant that serves meals without checking if the orders contain any secret ingredients — you might end up with something unexpected on your plate! 🍽️ If an attacker sends a clever request using these methods, they could access directories they shouldn't be able to see, leading to potential data leaks or unauthorized access. While not currently exploited, the risk remains a sneaky threat just waiting for the right moment!

Put simply

Think of it like a restaurant that serves meals without checking if the orders contain any secret ingredients — you might end up with something unexpected on your plate! 🍽️ This vulnerability arises because the Dir.open, Dir.new, Dir.entries, and Dir.empty? methods fail to sanitize NULL characters, allowing for unexpected directory traversal. Essentially, it opens the door for paths that should remain locked.

What to do

If an attacker sends a clever request using these methods, they could access directories they shouldn't be able to see, leading to potential data leaks or unauthorized access. While not currently exploited, the risk remains a sneaky threat just waiting for the right moment! Upgrade your Ruby version to at least 2.2.10, 2.3.7, 2.4.4, 2.5.1, or 2.6.0-preview1 to patch this vulnerability. Additionally, review any code using these methods to ensure proper input sanitization. Don't let a simple oversight put your project at risk! You've got this! By updating Ruby and ensuring proper checks are in place, you'll keep your code secure and your users happy! 🛡️

The record
Technical detail
CVSS
Not scored
CVSS v4.0
Not supplied
EPSS
0.09982 · 95.6th percentile
Published
2018-04-03T22:00Z
EPSS history
Timeline
  • 03 APR 22:00Z
    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?
    cvelistv5