CVE-2021-29509: Puma's Keepalive Connections Causing Denial Of Service
7.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.38169%
CWE
Published
5/18/2021
Updated
5/16/2023
KEV Status
No
Technology
Ruby
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
puma | rubygems | <= 4.3.7 | 4.3.8 |
puma | rubygems | >= 5.0.0, <= 5.3.0 | 5.3.1 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from incomplete handling of keepalive connections in Puma's request processing loop. The git patch shows modifications in lib/puma/server.rb around the request counter and keepalive management logic. The original code didn't properly enforce the max_fast_inline limit across all worker processes in clustered mode, allowing persistent connections to monopolize all available threads. The vulnerable function is process_client where connection reset and request counting occurs, as evidenced by the patch modifying this area to add proper cluster-wide starvation prevention.