CVE-2022-24790
JSON

9.1critical

HTTP Request Smuggling in puma

Severity
9.1critical CVSS:3.1 by GitHub_M
Exploit likelihood
2.17% (higher than 82% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-h99w-9q5r-gjq9

Description

Puma is a simple, fast, multi-threaded, parallel HTTP 1.1 server for Ruby/Rack applications. When using Puma behind a proxy that does not properly validate that the incoming HTTP request matches the RFC7230 standard, Puma and the frontend proxy may disagree on where a request starts and ends. This would allow requests to be smuggled via the front-end proxy to Puma. The vulnerability has been fixed in 5.6.4 and 4.3.12. Users are advised to upgrade as soon as possible. Workaround: when deploying a proxy in front of Puma, turning on any and all functionality to make sure that the request matches the RFC7230 standard.

Affected

Product or packageVersionsReported by
puma puma< 4.3.12, >= 5.0.0, < 5.6.4, before 4.3.12, from 5.0.0 before 5.6.4CVE List, NVD
puma (RubyGems)from 5.0.0 before 5.6.4, before 4.3.12GitHub Advisory Database
debian debian_linux10.0, 11.0NVD
fedoraproject fedora35, 36, 37NVD

All scores

GitHub_M9.1critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
GitHub9.1critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
NVD7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
NVD5.0medium CVSS:2.0AV:N/AC:L/Au:N/C:N/I:P/A:N

Classification

CWE-444

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total.

What each source says

CVE List

Puma is a simple, fast, multi-threaded, parallel HTTP 1.1 server for Ruby/Rack applications. When using Puma behind a proxy that does not properly validate that the incoming HTTP request matches the RFC7230 standard, Puma and the frontend proxy may disagree on where a request starts and ends. This would allow requests to be smuggled via the front-end proxy to Puma. The vulnerability has been fixed in 5.6.4 and 4.3.12. Users are advised to upgrade as soon as possible. Workaround: when deploying a proxy in front of Puma, turning on any and all functionality to make sure that the request matches the RFC7230 standard.

GitHub Advisory Database

When using Puma behind a proxy that does not properly validate that the incoming HTTP request matches the RFC7230 standard, Puma and the frontend proxy may disagree on where a request starts and ends. This would allow requests to be smuggled via the front-end proxy to Puma.

The following vulnerabilities are addressed by this advisory:

  • Lenient parsing of Transfer-Encoding headers, when unsupported encodings should be rejected and the final encoding must be chunked.
  • Lenient parsing of malformed Content-Length headers and chunk sizes, when only digits and hex digits should be allowed.
  • Lenient parsing of duplicate Content-Length headers, when they should be rejected.
  • Lenient parsing of the ending of chunked segments, when they should end with \r\n.

The vulnerability has been fixed in 5.6.4 and 4.3.12. When deploying a proxy in front of Puma, turning on any and all functionality to make sure that the request matches the RFC7230 standard.

These proxy servers are known to have "good" behavior re: this standard and upgrading Puma may not be necessary. Users are encouraged to validate for themselves.

  • Nginx (latest)
  • Apache (latest)
  • Haproxy 2.5+
  • Caddy (latest)
  • Traefik (latest)
NVD (es)

Puma es un servidor HTTP versión 1.1 simple, rápido, multihilo y paralelo para aplicaciones Ruby/Rack. Cuando es usado Puma detrás de un proxy que no comprueba apropiadamente que la petición HTTP entrante coincide con el estándar RFC7230, Puma y el proxy del frontend pueden no estar de acuerdo en dónde empieza y termina una petición. Esto permitiría contrabandear peticiones por medio del proxy del front-end a Puma. La vulnerabilidad ha sido corregida en versiones 5.6.4 y 4.3.12. Se recomienda a usuarios actualizar lo antes posible. Mitigación: cuando despliegue un proxy frente a Puma, habilite todas las funciones para asegurarse de que la petición se ajusta al estándar RFC7230

References

https://github.com/puma/puma/security/advisories/GHSA-h99w-9q5r-gjq9issue-tracking, third-party-advisory, web
https://github.com/puma/puma/commit/5bb7d202e24dec00a898dca4aa11db391d7787a5patch, third-party-advisory, web
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://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/TUBFJ44NCKJ34LECZRAP4N5VL6USJSIB/vendor-advisory
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/L7NESIBFCNSR3XH7LXDPKVMSUBNUB43G/vendor-advisory
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/F6YWGIIKL7KKTS3ZOAYMYPC7D6WQ5OA5/vendor-advisory
https://nvd.nist.gov/vuln/detail/CVE-2022-24790advisory
https://github.com/puma/pumapackage
https://github.com/rubysec/ruby-advisory-db/blob/master/gems/puma/CVE-2022-24790.ymlweb
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/F6YWGIIKL7KKTS3ZOAYMYPC7D6WQ5OA5web

Sources

SourceRecordLicence
CVE ListCVE-2022-24790 changed 2025-04-23CVE Terms of Use
GitHub Advisory DatabaseGHSA-h99w-9q5r-gjq9 changed 2024-02-16CC-BY-4.0
NVDCVE-2022-24790 changed 2026-06-17Public domain