Critical WEBrick Vulnerability in Ruby: HTTP Request Smuggling Risk
Summary
ALPINE-CVE-2020-25613: An issue was discovered in Ruby through 2.5.8, 2.6.x through 2.6.6, and 2.7.x through 2.7.1. Affects ruby versions < 2.5.8-r1. Fixed in 2.5.8-r1. How to fix ↓
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.
No signup required · Results in about 60 seconds
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. Ruby includes WEBrick, a lightweight HTTP server that facilitates the development and testing of web applications. However, WEBrick has a vulnerability that can lead to HTTP Request Smuggling attacks, compromising the integrity of web applications that rely on it.
Vulnerability Detail
An issue was discovered in Ruby through versions 2.5.8, 2.6.x through 2.6.6, and 2.7.x through 2.7.1. The vulnerability lies in WEBrick, which did not rigorously check the transfer-encoding header value. This oversight allows an attacker to potentially exploit the vulnerability to bypass reverse proxies with inadequate header checks, leading to HTTP Request Smuggling attacks. The CVSS score for this vulnerability is 7.5, indicating a high severity level.
How To Fix
Minimum fixed version
2.5.8-r1
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 measure, consider disabling WEBrick or using an alternative HTTP server until the Ruby package can be updated. Additionally, ensure that your reverse proxy is configured to validate headers properly to mitigate the risk of HTTP Request Smuggling.
Conclusion
The WEBrick vulnerability in Ruby poses a significant risk of HTTP Request Smuggling attacks. It is crucial for developers to update their Ruby installations to the latest patched versions to mitigate this risk. Utilizing tools like Vulert can help in monitoring and managing vulnerabilities effectively.
See every vulnerability recorded for ruby →
FAQ
HTTP Request Smuggling is a technique used by attackers to send malicious requests to a server, which can lead to unauthorized actions or data breaches.
You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.
Ruby versions 2.5.8, 2.6.x through 2.6.6, and 2.7.x through 2.7.1 are affected by this vulnerability.
If immediate updates are not possible, consider disabling WEBrick or using a different HTTP server as a temporary workaround.
Vulert monitors and alerts for open-source vulnerabilities in your software using just a manifest file like package-lock.json, providing real-time insights.
References
Related vulnerabilities
Recent vulnerabilities recorded for ruby.