Critical Vulnerability in Ruby Rack Package: Log Injection via Newline Characters

ruby-rack Updated 14 Dec 2025

Summary

12/02/2025
N/A
Yes i
Medium
5.6

UBUNTU-CVE-2025-25184: Rack provides an interface for developing web applications in Ruby. Affects ruby-rack versions < 1.5.2-3+deb8u3ubuntu1~esm9. Fixed in 1.5.2-3+deb8u3ubuntu1~esm9. 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 Rack is a modular Ruby web server interface that provides a simple and efficient way to develop web applications. It acts as a middleware layer, allowing developers to build applications that can communicate with web servers. The package is widely used in Ruby on Rails applications and other Ruby-based frameworks. However, it has been found to be vulnerable to a log injection issue that can be exploited under specific conditions, potentially leading to log manipulation and data integrity issues.

Vulnerability Detail

The vulnerability arises from the Rack::CommonLogger component, which can be exploited by crafting input that includes newline characters. This allows an attacker to manipulate log entries by injecting malicious content into the logs. When a user provides authorization credentials via Rack::Auth::Basic, the username is stored in env['REMOTE_USER'] and logged by Rack::CommonLogger. If the username contains CRLF (Carriage Return Line Feed) characters, the logger will record these characters, leading to broken log formats or fraudulent entries. This can obscure legitimate activity and allow for the injection of malicious data into log files.

How To Fix

Minimum fixed version

1.5.2-3+deb8u3ubuntu1~esm9

This is the first release that contains the fix.

sudo apt-get install --only-upgrade ruby-rack

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

Workaround

As a temporary workaround, avoid using usernames that contain CRLF characters and ensure that input validation is implemented to sanitize user inputs before they are logged. This can help mitigate the risk of log injection until the package is updated.

Conclusion

The Ruby Rack package has a critical vulnerability that allows for log injection through newline characters in usernames. This can lead to serious consequences, including log manipulation and data integrity issues. It is crucial to update the package to the latest patched version to mitigate these risks. Temporary workarounds should be implemented until an update can be performed.

See every vulnerability recorded for ruby-rack →

Share this vulnerability

FAQ

The vulnerability allows for log injection through the use of newline characters in usernames, which can manipulate log entries.

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

If exploited, this vulnerability can lead to log manipulation, obscuring real activity, and potentially injecting malicious data into log files.

Yes, patched versions of the Ruby Rack package are available for various Ubuntu distributions. It is recommended to update to these versions.

Implement input validation to sanitize usernames and avoid using CRLF characters as a temporary measure until the package can be updated.

How To Fix

Minimum fixed version

1.5.2-3+deb8u3ubuntu1~esm9

This is the first release that contains the fix.

sudo apt-get install --only-upgrade ruby-rack

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