CVE-2024-47220
NoneCVSS
—
EPSS
0.4%
Published
Sep 22, 2024
CISA due date
—
Cloudanix analysis
Some Ruby web services may misread specially crafted web requests, letting an attacker sneak in hidden requests that bypass normal protections.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Moderate
- Impact
- Data Tampering
- Component
- Library
- Class
- Improper Input Validation
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
WEBrick versions through 1.8.1 can parse ambiguous HTTP requests incorrectly when a request contains both Content-Length and Transfer-Encoding headers. This enables HTTP request smuggling: a front-end proxy, load balancer, or intermediary may interpret the request boundary differently than WEBrick, allowing attacker-controlled bytes to be treated as a second, separate HTTP request. The result can be request routing confusion, bypass of access controls enforced by a front end, cache poisoning, credential/session confusion, or unauthorized access to endpoints that the attacker should not be able to reach directly.
Why it matters to the business
Applications using WEBrick in exposed or production-like deployments may be vulnerable to traffic manipulation that bypasses normal request handling and security controls. Although EPSS is currently low and this CVE is not in the CISA KEV catalog, request smuggling vulnerabilities can have high operational impact when WEBrick sits behind a proxy or gateway, especially for administrative paths, internal APIs, or authentication-protected functionality. The supplier notes that WEBrick should not be used in production, so continued production exposure also represents an architectural risk beyond this specific flaw.
How an attack unfolds
An attacker sends a crafted HTTP request to a service path handled by WEBrick, typically through a front-end proxy or load balancer. The request includes both Content-Length and Transfer-Encoding headers and embeds a second HTTP request inside the body of the first request, for example placing a request for an administrative endpoint after a seemingly benign request. If the intermediary and WEBrick disagree about where the first request ends, the embedded bytes may be queued or processed by WEBrick as a separate request. Depending on routing and authentication behavior, this can let the attacker reach restricted endpoints, poison responses, desynchronize client connections, or cause another user's request to be paired with attacker-controlled content. Exploitation generally requires network access to the HTTP service and a deployment topology where WEBrick receives requests that have not been normalized or rejected by an upstream component.
How to fix it
Do not use WEBrick for production Internet-facing services. Replace WEBrick with a production-grade Ruby application server or place the application behind an HTTP component that rejects malformed or ambiguous requests before they reach WEBrick. Upgrade the WEBrick gem/package to a version newer than 1.8.1, such as a vendor-provided patched release, where available. If immediate replacement or upgrade is not possible, configure upstream proxies, load balancers, and web application firewalls to reject any request containing both Content-Length and Transfer-Encoding headers, reject malformed chunked encoding, disable unsafe connection reuse where practical, and ensure administrative or internal endpoints are not reachable through the same public listener. Also review Ruby dependency lockfiles and container images to ensure vulnerable WEBrick versions are not bundled indirectly.
How to confirm the fix worked
Confirm that no runtime dependency resolves to WEBrick 1.8.1 or earlier by checking Gemfile.lock, gem inventory, container image manifests, and operating-system package metadata. Send a safe validation request in a controlled test environment containing both Content-Length and Transfer-Encoding headers and verify that the request is rejected by the front end with a 400-class response and is not forwarded to WEBrick. Confirm that upstream proxies normalize or block ambiguous framing and that backend access logs do not show an embedded second request being processed. Re-run application integration tests for authentication, admin routes, reverse proxy behavior, keep-alive handling, and caching after any server or proxy change.
Typical attack path
- Identify an HTTP service implemented with or backed by Ruby WEBrick, especially one exposed behind a reverse proxy, load balancer, API gateway, or cache.
- Send probing requests that include both Content-Length and Transfer-Encoding headers to test whether the front end and WEBrick parse request boundaries differently.
- Craft a request where a benign outer request contains an embedded second request such as an administrative path, internal API path, or authenticated endpoint.
- Use connection reuse or proxy behavior to cause WEBrick to process the embedded request as a separate HTTP request.
- Observe response desynchronization, unexpected status codes, cache behavior, access to restricted routes, or impact on subsequent users' requests.
- Iterate on header ordering, transfer encoding, body length, and connection handling to reliably bypass controls or poison traffic.
How to detect it
Look for evidence of HTTP request smuggling probes or successful request desynchronization. Useful sources include reverse proxy logs, load balancer logs, WAF events, raw packet captures, Ruby application logs, WEBrick access/error logs, and authentication or administrative endpoint audit logs. Hunt for requests where both Content-Length and Transfer-Encoding are present, especially when followed by unusual 400/408/502 responses, connection resets, unexpected keep-alive behavior, or backend requests that have no matching front-end log entry. Investigate any logs showing HTTP request lines embedded in request bodies, repeated chunked-transfer anomalies, access to administrative paths immediately after malformed requests from the same source, mismatched status codes between front end and backend, or cache responses associated with unexpected users. If raw headers are not retained, correlate front-end and backend request IDs, timestamps, source addresses, and connection reuse patterns to find backend requests that appear without a corresponding valid client request.
- Content-Length:
- Transfer-Encoding: chunked
- Content-Length: 0\r\nTransfer-Encoding: chunked
- Transfer-Encoding: chunked\r\nContent-Length:
- \r\n0\r\n\r\nGET /
- \r\n0\r\n\r\nPOST /
- GET /admin HTTP/1.1
- POST /admin HTTP/1.1
- 400 Bad Request
- Bad Request-Line
- invalid chunk size
- malformed chunked encoding
- WEBrick
What your security team should do
- Inventory all Ruby services, development tools, internal utilities, containers, and appliances that include or start WEBrick, prioritizing any network-exposed listener.
- Remove WEBrick from production request paths; migrate to a production-grade Ruby server or ensure a hardened reverse proxy rejects ambiguous HTTP framing before forwarding traffic.
- Upgrade WEBrick to a patched version newer than 1.8.1 wherever the gem is present, including transitive dependencies and base images.
- Add proxy/WAF rules to block requests containing both Content-Length and Transfer-Encoding headers and alert on repeated attempts.
- Review access logs and raw HTTP telemetry for request smuggling probes, especially requests targeting administrative paths or containing embedded HTTP request lines inside request bodies.
- Limit exposure of administrative and internal routes with network controls and independent authentication checks that do not rely solely on a front-end proxy.
- Because no public exploit maturity is indicated and EPSS is low, prioritize remediation by exposure: Internet-facing and proxy-backed WEBrick deployments first, then internal-only development or test instances.
The record
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 | Introduced | Fixed |
|---|---|---|---|
| RubyGems | webrick | 0 | 1.8.2 |
| Chainguard | kube-fluentd-operator | 0 | 1.18.2-r33 |
| Chainguard | kube-fluentd-operator-compat | 0 | 1.18.2-r33 |
| Chainguard | kube-fluentd-operator-default-config | 0 | 1.18.2-r33 |
| Chainguard | kube-fluentd-operator-oci-entrypoint | 0 | 1.18.2-r33 |
| Chainguard | ruby3.1-fluentd-kubernetes-daemonset-1.16 | 0 | 1.16.6.1.2-r1 |
| Chainguard | ruby3.1-fluentd-kubernetes-daemonset-1.16-kinesis | 0 | 1.16.6.1.2-r1 |
| Chainguard | ruby3.2-fluentd-kubernetes-daemonset-1.16 | 0 | 1.16.6.1.2-r1 |
| Chainguard | ruby3.2-fluentd-kubernetes-daemonset-1.16-kinesis | 0 | 1.16.6.1.2-r1 |
| Chainguard | ruby3.2-webrick | 0 | 1.8.2-r0 |
| Chainguard | ruby3.3-fluentd-kubernetes-daemonset-1.16 | 0 | 1.16.6.1.2-r1 |
| Chainguard | ruby3.3-fluentd-kubernetes-daemonset-1.16-kinesis | 0 | 1.16.6.1.2-r1 |
| Chainguard | ruby3.4-fluentd-kubernetes-daemonset-1.16 | 0 | 1.16.6.1.2-r2 |
| Chainguard | ruby3.4-fluentd-kubernetes-daemonset-1.16-kinesis | 0 | 1.16.6.1.2-r2 |
| Debian:12 | ruby-webrick | 0 | No fix |
| Debian:13 | ruby-webrick | 0 | No fix |
| Debian:14 | ruby-webrick | 0 | 1.9.1-1 |
| Mageia:9 | ruby-webrick | 0 | 1.7.0-3.mga9 |
| SUSE:Enterprise Storage 7.1 | ruby2.5 | 0 | 2.5.9-150000.4.36.1 |
| SUSE:Enterprise Storage 7.1 | ruby2.5 | 0 | 2.5.9-150000.4.41.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | ruby2.5 | 0 | 2.5.9-150000.4.36.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | ruby2.5 | 0 | 2.5.9-150000.4.41.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | ruby2.5 | 0 | 2.5.9-150000.4.36.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | ruby2.5 | 0 | 2.5.9-150000.4.41.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS | ruby2.5 | 0 | 2.5.9-150000.4.36.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS | ruby2.5 | 0 | 2.5.9-150000.4.41.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP5-ESPOS | ruby2.5 | 0 | 2.5.9-150000.4.36.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP5-ESPOS | ruby2.5 | 0 | 2.5.9-150000.4.41.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP5-LTSS | ruby2.5 | 0 | 2.5.9-150000.4.36.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP5-LTSS | ruby2.5 | 0 | 2.5.9-150000.4.41.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP6 | ruby2.5 | 0 | 2.5.9-150000.4.36.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP6 | ruby2.5 | 0 | 2.5.9-150000.4.41.1 |
| SUSE:Linux Enterprise Server 12 SP5-LTSS | ruby2.1 | 0 | 2.1.9-19.9.1 |
| SUSE:Linux Enterprise Server 15 SP3-LTSS | ruby2.5 | 0 | 2.5.9-150000.4.36.1 |
| SUSE:Linux Enterprise Server 15 SP3-LTSS | ruby2.5 | 0 | 2.5.9-150000.4.41.1 |
| SUSE:Linux Enterprise Server 15 SP4-LTSS | ruby2.5 | 0 | 2.5.9-150000.4.36.1 |
| SUSE:Linux Enterprise Server 15 SP4-LTSS | ruby2.5 | 0 | 2.5.9-150000.4.41.1 |
| SUSE:Linux Enterprise Server 15 SP5-LTSS | ruby2.5 | 0 | 2.5.9-150000.4.36.1 |
| SUSE:Linux Enterprise Server 15 SP5-LTSS | ruby2.5 | 0 | 2.5.9-150000.4.41.1 |
| SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 | ruby2.1 | 0 | 2.1.9-19.9.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP3 | ruby2.5 | 0 | 2.5.9-150000.4.36.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP3 | ruby2.5 | 0 | 2.5.9-150000.4.41.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP4 | ruby2.5 | 0 | 2.5.9-150000.4.36.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP4 | ruby2.5 | 0 | 2.5.9-150000.4.41.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP5 | ruby2.5 | 0 | 2.5.9-150000.4.36.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP5 | ruby2.5 | 0 | 2.5.9-150000.4.41.1 |
| SUSE:Manager Proxy 4.3 | ruby2.5 | 0 | 2.5.9-150000.4.36.1 |
| SUSE:Manager Proxy 4.3 | ruby2.5 | 0 | 2.5.9-150000.4.41.1 |
| SUSE:Manager Server 4.3 | ruby2.5 | 0 | 2.5.9-150000.4.36.1 |
| SUSE:Manager Server 4.3 | ruby2.5 | 0 | 2.5.9-150000.4.41.1 |
| Ubuntu:16.04:LTS | jruby | 0 | No fix |
| Ubuntu:18.04:LTS | jruby | 0 | No fix |
| Ubuntu:20.04:LTS | jruby | 0 | No fix |
| Ubuntu:22.04:LTS | ruby-webrick | 0 | 1.7.0-3ubuntu0.1 |
| Ubuntu:24.04:LTS | ruby-webrick | 0 | 1.8.1-1ubuntu0.1 |
| Ubuntu:24.10 | ruby-webrick | 0 | 1.8.1-1ubuntu1 |
| Ubuntu:25.04 | ruby-webrick | 0 | 1.8.1-1ubuntu1 |
| Ubuntu:25.10 | ruby-webrick | 0 | 1.8.1-1ubuntu1 |
| Ubuntu:Pro:14.04:LTS | jruby | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | jruby | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | ruby2.3 | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | ruby2.3 | 0 | 2.3.1-2~ubuntu16.04.16+esm11 |
| Ubuntu:Pro:18.04:LTS | jruby | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | ruby2.5 | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | ruby2.5 | 0 | 2.5.1-1ubuntu1.16+esm6 |
| Ubuntu:Pro:20.04:LTS | jruby | 0 | No fix |
| Ubuntu:Pro:20.04:LTS | ruby2.7 | 0 | No fix |
| Ubuntu:Pro:20.04:LTS | ruby2.7 | 0 | 2.7.0-5ubuntu1.18+esm3 |
| Wolfi | kube-fluentd-operator | 0 | 1.18.2-r33 |
| Wolfi | kube-fluentd-operator-compat | 0 | 1.18.2-r33 |
| Wolfi | kube-fluentd-operator-default-config | 0 | 1.18.2-r33 |
| Wolfi | kube-fluentd-operator-oci-entrypoint | 0 | 1.18.2-r33 |
| Wolfi | ruby3.2-webrick | 0 | 1.8.2-r0 |
| openSUSE:Leap 15.6 | ruby2.5 | 0 | 2.5.9-150000.4.36.1 |
| openSUSE:Leap 15.6 | ruby2.5 | 0 | 2.5.9-150000.4.41.1 |
Related vulnerabilities
- CVE-2025-6442 Ruby WEBrick read_header HTTP Request Smuggling Vulnerability. Also affects webrick
- CVE-2017-10784 The Basic authentication code in WEBrick library in Ruby before 2.2.8, 2.3.x before… Also affects webrick
- CVE-2009-4492 WEBrick 1.3.1 in Ruby 1.8.6 through patchlevel 383, 1.8.7 through patchlevel 248… Also affects webrick
- CVE-2008-4310 httputils.rb in WEBrick in Ruby 1.8.1 and 1.8.5, as used in Red Hat Enterprise Linux 4… Also affects webrick
- CVE-2026-33170 Active Support is a toolkit of support libraries and Ruby core extensions extracted from… Also affects kube-fluentd-operator
- CVE-2026-33169 Active Support is a toolkit of support libraries and Ruby core extensions extracted from… Also affects kube-fluentd-operator
- CVE-2026-25500 Rack is a modular Ruby web server interface. Also affects kube-fluentd-operator
- CVE-2026-25765 Faraday is an HTTP client library abstraction layer that provides a common interface over… Also affects kube-fluentd-operator