CVE-2024-47220 is a high-severity (CVSS 7.5) vulnerability in webrick. A fix is available for webrick — see the affected versions and patch details below.
HTTP Request Smuggling in ruby webrick
Real-World Exposure
webrickReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects RubyGems packages — download data is not available via public APIs for these ecosystems.
Description
An issue was discovered in the WEBrick toolkit through 1.8.1 for Ruby. It allows HTTP request smuggling by providing both a Content-Length header and a Transfer-Encoding header, e.g., "GET /admin HTTP/1.1\r\n" inside of a "POST /user HTTP/1.1\r\n" request. NOTE: the supplier's position is "Webrick should not be used in production."
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 💎RubyGems | webrick | all versions | 1.8.2bundle update webrick --conservative |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for webrick, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update webrick to 1.8.2 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2024-47220 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
This CVE is rated as having Moderate impact because Webrick should not be used in production. It is only still maintained because there are other gems relying on it, most of which do so only for testing, and only because it is a pure ruby implementation and it was shipped with Ruby in the past.
As a temporary workaround, avoid using WEBrick in production environments. If you must use it, ensure that your application is behind a reverse proxy that can handle request validation and filtering to mitigate the risk of HTTP request smuggling.Source: Red Hat security advisory for CVE-2024-47220 (CC BY 4.0)
| Product | Fixed in | Advisory |
|---|---|---|
| RHOL-5.9-RHEL-9 | openshift-logging/cluster-logging-operator-bundle:v5.9.11-25 | RHSA-2025:1227 |
Frequently Asked Questions
Is CVE-2024-47220 in your dependencies?
Find it across RubyGems, including transitive dependencies.