Path Checking Vulnerability in Ruby Package: ALPINE-CVE-2019-15845

ruby Updated 02 Oct 2025

Summary

26/11/2019
N/A
Yes i
Medium
6.5

ALPINE-CVE-2019-15845: Ruby through 2.4.7, 2.5.x through 2.5.6, and 2.6.x through 2.6.4 mishandles path checking within File.fnmatch functions. Affects ruby versions < 2.5.7-r0. Fixed in 2.5.7-r0. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

Ruby is a dynamic, open-source programming language with a focus on simplicity and productivity. It has an elegant syntax that is natural to read and easy to write. The Ruby package in Alpine Linux is widely used for developing web applications and scripts. However, certain versions of Ruby are vulnerable to a path checking issue that can lead to security risks.

Vulnerability Detail

The vulnerability identified as CVE-2019-15845 affects Ruby versions through 2.4.7, 2.5.x through 2.5.6, and 2.6.x through 2.6.4. It mishandles path checking within the File.fnmatch functions, which can allow attackers to bypass intended restrictions and potentially access unauthorized files. This flaw can lead to data leakage or unauthorized file access, posing a significant security threat.

How To Fix

Minimum fixed version

2.5.7-r0

This is the first release that contains the fix.

sudo apk add --upgrade ruby

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, avoid using the affected versions of Ruby until an upgrade can be performed. Additionally, implement strict file access controls to mitigate the risk of unauthorized access.

Conclusion

The CVE-2019-15845 vulnerability in Ruby poses a significant risk due to improper path checking, which can lead to unauthorized file access. It is crucial to update to the patched versions to mitigate this risk and ensure the security of applications using Ruby.

See every vulnerability recorded for ruby →

Share this vulnerability

FAQ

CVE-2019-15845 is a vulnerability in Ruby that affects path checking within File.fnmatch functions, allowing potential unauthorized file access.

Affected versions include Ruby through 2.4.7, 2.5.x through 2.5.6, and 2.6.x through 2.6.4.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

The CVSS score for CVE-2019-15845 is 6.5, indicating a medium severity level.

If an immediate update is not possible, implement strict file access controls and avoid using the affected Ruby versions until an upgrade can be performed.

Related vulnerabilities

Recent vulnerabilities recorded for ruby.

How To Fix

Minimum fixed version

2.5.7-r0

This is the first release that contains the fix.

sudo apk add --upgrade ruby

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback