CVE-2021-41136
JSON

3.7low

Inconsistent Interpretation of HTTP Requests ('HTTP Request Smuggling') in puma

Severity
3.7low CVSS:3.1 by GitHub_M
Exploit likelihood
1.20% (higher than 69% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-48w2-rm65-62xx

Description

Puma is a HTTP 1.1 server for Ruby/Rack applications. Prior to versions 5.5.1 and 4.3.9, using `puma` with a proxy which forwards HTTP header values which contain the LF character could allow HTTP request smugggling. A client could smuggle a request through a proxy, causing the proxy to send a response back to another unknown client. The only proxy which has this behavior, as far as the Puma team is aware of, is Apache Traffic Server. 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. This vulnerability was patched in Puma 5.5.1 and 4.3.9. As a workaround, do not use Apache Traffic Server with `puma`.

Affected

Product or packageVersionsReported by
puma puma>= 5.0.0, < 5.5.1, < 4.3.9, up to 4.3.8, from 5.0.0 up to 5.5.0CVE List, NVD
puma (RubyGems)from 5.0.0 before 5.5.1, before 4.3.9GitHub Advisory Database
debian debian_linux10.0, 11.0NVD

All scores

GitHub_M3.7low CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:L/I:L/A:N
GitHub3.7low CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:L/I:L/A:N
NVD3.7low CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:L/I:L/A:N
NVD3.6low CVSS:2.0AV:N/AC:H/Au:S/C:P/I:P/A:N

Classification

What each source says

CVE List

Puma is a HTTP 1.1 server for Ruby/Rack applications. Prior to versions 5.5.1 and 4.3.9, using `puma` with a proxy which forwards HTTP header values which contain the LF character could allow HTTP request smugggling. A client could smuggle a request through a proxy, causing the proxy to send a response back to another unknown client. The only proxy which has this behavior, as far as the Puma team is aware of, is Apache Traffic Server. 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. This vulnerability was patched in Puma 5.5.1 and 4.3.9. As a workaround, do not use Apache Traffic Server with `puma`.

GitHub Advisory Database
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:

NVD (es)

Puma es un servidor HTTP versión 1.1 para aplicaciones Ruby/Rack. Antes de las versiones 5.5.1 y 4.3.9, usar "puma" con un proxy que reenvíe valores del encabezado HTTP que contengan el carácter LF podía permitir el contrabando de peticiones HTTP. Un cliente podía pasar una petición mediante un proxy, causando que el proxy enviara una respuesta a otro cliente desconocido. El único proxy que presenta este comportamiento, hasta donde el equipo de Puma sabe, es Apache Traffic Server. Si el proxy usa conexiones persistentes y el cliente añade otra petición por medio de HTTP pipelining, el proxy puede confundirla con el cuerpo de la primera petición. Puma, sin embargo, lo vería como dos peticiones, y cuando procese la segunda petición, devolverá una respuesta que el proxy no espera. Si el proxy ha reusado la conexión persistente con Puma para enviar otra petición para un cliente diferente, la segunda respuesta del primer cliente será enviada al segundo cliente. Esta vulnerabilidad fue parcheada en Puma versiones 5.5.1 y 4.3.9. Como solución, no use Apache Traffic Server con "puma"

References

https://github.com/puma/puma/security/advisories/GHSA-48w2-rm65-62xxthird-party-advisory, web
https://github.com/puma/puma/commit/436c71807f00e07070902a03f79fd3e130eb6b18web
https://github.com/puma/puma/commit/acdc3ae571dfae0e045cf09a295280127db65c7fpatch, third-party-advisory, web
https://github.com/puma/puma/commit/fb6ad8f8013ab5cdbb2f444cbfabd0b4fde71139web
https://www.debian.org/security/2022/dsa-5146third-party-advisory, vendor-advisory, web
https://security.gentoo.org/glsa/202208-28third-party-advisory, vendor-advisory, web
https://lists.debian.org/debian-lts-announce/2022/08/msg00015.htmlmailing-list, third-party-advisory, web
https://nvd.nist.gov/vuln/detail/CVE-2021-41136advisory
https://github.com/puma/pumapackage
https://github.com/puma/puma/releases/tag/v4.3.9web
https://github.com/puma/puma/releases/tag/v5.5.1web
https://github.com/rubysec/ruby-advisory-db/blob/master/gems/puma/CVE-2021-41136.ymlweb

Sources

SourceRecordLicence
CVE ListCVE-2021-41136 changed 2025-05-27CVE Terms of Use
GitHub Advisory DatabaseGHSA-48w2-rm65-62xx changed 2026-07-08CC-BY-4.0
NVDCVE-2021-41136 changed 2026-06-17Public domain