{"id":"CVE-2021-29509","published":"2021-05-11T16:50:11Z","modified":"2024-08-03T22:11:05Z","title":"Keepalive Connections Causing Denial Of Service in puma","vendor":"puma","product":"puma","tier":"tail","description":{"text":"Puma is a concurrent HTTP 1.1 server for Ruby/Rack applications. The fix for CVE-2019-16770 was incomplete. The original fix only protected existing connections that had already been accepted from having their requests starved by greedy persistent-connections saturating all threads in the same process. However, new connections may still be starved by greedy persistent-connections saturating all threads in all processes in the cluster. A `puma` server which received more concurrent `keep-alive` connections than the server had threads in its threadpool would service only a subset of connections, denying service to the unserved connections. This problem has been fixed in `puma` 4.3.8 and 5.3.1. Setting `queue_requests false` also fixes the issue. This is not advised when using `puma` without a reverse proxy, such as `nginx` or `apache`, because you will open yourself to slow client attacks (e.g. slowloris). The fix is very small and a git patch is available for those using unsupported versions of Puma.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.5,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01599,"percentile":0.76369,"provenance":"source"},"cwes":[{"id":"CWE-400","name":"Uncontrolled Resource Consumption"}],"references":[{"url":"https://github.com/puma/puma/security/advisories/GHSA-q28m-8xjw-8vr5","tags":["x_refsource_CONFIRM"]},{"url":"https://gist.github.com/nateberkopec/4b3ea5676c0d70cbb37c82d54be25837","tags":["x_refsource_MISC"]},{"url":"https://github.com/puma/puma/security/policy","tags":["x_refsource_MISC"]},{"url":"https://rubygems.org/gems/puma","tags":["x_refsource_MISC"]},{"url":"https://security.gentoo.org/glsa/202208-28","tags":["vendor-advisory","x_refsource_GENTOO"]},{"url":"https://lists.debian.org/debian-lts-announce/2022/08/msg00015.html","tags":["mailing-list","x_refsource_MLIST"]}],"priority":{"score":20.5,"factors":[{"name":"EPSS percentile","points":15.27},{"name":"CVSS severity","points":5.25}]},"vendorSlug":"puma","affectedVersions":[{"vendor":"puma","product":"puma","versions":["< 4.3.8",">= 5.0.0, < 5.3.1"]}],"affected":[{"ecosystem":"RubyGems","package":"puma","vulnerableRanges":["<4.3.8",">=5.0.0, <5.3.1"],"patched":["4.3.8","5.3.1"],"from":["GHSA-q28m-8xjw-8vr5"],"provenance":"source"}],"summary":{"text":"The Puma Ruby/Rack HTTP server, in its cluster mode thread handling, fails to fully protect new connections from being starved: when more concurrent keep-alive connections arrive than the server has threads, greedy persistent connections can occupy all threads across all processes, leaving some connections unserved. An attacker with only network access, requiring no authentication or user interaction, can open enough persistent connections to exhaust the thread pool and deny service to other clients.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T07:14:19Z"},"euvd":{"id":"EUVD-2021-1158","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-puma-cve-2019-16770","parents":[{"from":"CVE-2019-16770","to":"CVE-2021-29509","relation":"incomplete-fix","confidence":"high","kind":"lineage","evidence":[{"kind":"text","provenance":"source","relation":"incomplete-fix","quote":"The fix for CVE-2019-16770 was incomplete.","from":"CVE.org","in":"CVE-2021-29509"}]}],"packageHistory":[{"cve":"CVE-2020-5249","published":"2020-03-02","fixed":"4.3.3","kev":false},{"cve":"CVE-2020-11076","published":"2020-05-22","fixed":"4.3.4","kev":false},{"cve":"CVE-2020-11077","published":"2020-05-22","fixed":"4.3.5","kev":false,"link":{"from":"CVE-2020-11077","to":"CVE-2021-29509","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"RubyGems:puma","fromFixed":"4.3.5","toFixed":"4.3.8","daysApart":354}]}},{"cve":"CVE-2021-29509","published":"2021-05-11","fixed":"5.3.1","kev":false},{"cve":"CVE-2021-41136","published":"2021-10-12","fixed":"5.5.1","kev":false,"link":{"from":"CVE-2021-29509","to":"CVE-2021-41136","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"RubyGems:puma","fromFixed":"5.3.1","toFixed":"5.5.1","daysApart":154},{"kind":"version-step","provenance":"source","package":"RubyGems:puma","fromFixed":"4.3.8","toFixed":"4.3.9","daysApart":154}]}},{"cve":"CVE-2022-23634","published":"2022-02-11","fixed":"5.6.2","kev":false},{"cve":"CVE-2022-24790","published":"2022-03-30","fixed":"5.6.4","kev":false}],"package":"RubyGems:puma"}}