Critical Vulnerability in Ruby Package: Path Manipulation Risk on Windows

ruby Updated 02 Oct 2025

Summary

30/07/2021
N/A
Yes i
High
7.5

ALPINE-CVE-2021-28966: In Ruby through 3.0 on Windows, a remote attacker can submit a crafted path when a Web application handles a parameter with TmpDir. Affects ruby versions < 2.5.9-r0. Fixed in 2.5.9-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 Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Ruby is a dynamic, open-source programming language known for its simplicity and productivity. It is widely used for web development, particularly with the Ruby on Rails framework. The language supports multiple programming paradigms and has a rich ecosystem of libraries and tools. However, a vulnerability has been identified that affects Ruby versions through 3.0 on Windows, which could allow remote attackers to exploit path handling in web applications.

Vulnerability Detail

In Ruby versions through 3.0, a vulnerability exists that allows a remote attacker to submit a crafted path when a web application handles a parameter with TmpDir. This could lead to unauthorized access or manipulation of files, potentially compromising the integrity and confidentiality of the application. The vulnerability is classified with a CVSS score of 7.5, indicating a high severity level.

How To Fix

Minimum fixed version

2.5.9-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, consider validating and sanitizing user input for file paths before processing them in your application. This can help mitigate the risk of path manipulation attacks.

Conclusion

The identified vulnerability in Ruby poses a significant risk, particularly for applications running on Windows. It is crucial for developers to update their Ruby installations to the patched versions to mitigate potential threats. Additionally, employing input validation can serve as a temporary measure to enhance security.

See every vulnerability recorded for ruby →

Share this vulnerability

FAQ

The CVSS score of this vulnerability is 7.5, indicating a high severity level.

Ruby versions through 3.0 on Windows are affected by this vulnerability.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.

The vulnerability could allow remote attackers to manipulate file paths, leading to unauthorized access or data breaches.

Yes, Vulert can monitor and alert you in real-time for open-source vulnerabilities in your software using just a manifest file like package-lock.json.

Related vulnerabilities

Recent vulnerabilities recorded for ruby.

How To Fix

Minimum fixed version

2.5.9-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