CVE-2021-41136 is a low-severity (CVSS 3.7) CWE-444 vulnerability in puma. A fix is available for puma — see the affected versions and patch details below.
Puma with proxy which forwards LF characters as line endings could allow HTTP request smuggling
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
puma💎pumaReal-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
Impact
Prior to puma version 5.5.0, using puma with a proxy which forwards LF characters as line endings could allow HTTP request smuggling. A client could smuggle a request through a proxy, causing the proxy to send a response back to another unknown client.
This behavior (forwarding LF characters as line endings) is very uncommon amongst proxy servers, so we have graded the impact here as "low". Puma is only aware of a single proxy server which has this behavior.
If the proxy uses persistent connections and the client adds another request in via HTTP pipelining, the proxy may mistake it as the first request's body. Puma, however, would see it as two requests, and when processing the second request, send back a response that the proxy does not expect. If the proxy has reused the persistent connection to Puma to send another request for a different client, the second response from the first client will be sent to the second client.
Patches
This vulnerability was patched in Puma 5.5.1 and 4.3.9.
Workarounds
This vulnerability only affects Puma installations without any proxy in front.
Use a proxy which does not forward LF characters as line endings.
Proxies which do not forward LF characters as line endings:
- Nginx
- Apache (>2.4.25)
- Haproxy
- Caddy
- Traefik
Possible Breakage
If you are dealing with legacy clients that want to send LF as a line ending in an HTTP header, this will cause those clients to receive a 400 error.
References
For more information
If you have any questions or comments about this advisory:
- Open an issue in Puma
- See our security policy
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 💎RubyGems | puma | ≥ 5.0.0&&< 5.5.1 | 5.5.1bundle update puma --conservative |
| 💎RubyGems | puma | all versions | 4.3.9bundle update puma --conservative |
Affected Products
debian linuxdebianpumapumaDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for puma, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update puma to 5.5.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2021-41136 is resolved across your whole dependency graph.
Workarounds
Constrain what reaches the vulnerable code: limit the size and shape of untrusted input, isolate the affected component in a sandboxed or least-privileged process, and enable the platform's memory-safety mitigations (ASLR, stack protector, hardened allocator) so an out-of-bounds access is more likely to fail closed than to be exploitable.
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.
Red Hat CloudForms 5.0 (CFME 5.11) is in the maintenance phase and Medium and Low impact security bugs will not be fixed. See https://access.redhat.com/support/policy/updates/cloudforms for additional information.
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat Satellite 6.11 for RHEL 7 | tfm-rubygem-puma-0:5.6.2-1.el7sat | RHSA-2022:5498 |
Frequently Asked Questions
Is CVE-2021-41136 in your dependencies?
Find it across RubyGems, including transitive dependencies.