Miggo Logo

CVE-2021-29509: Puma's Keepalive Connections Causing Denial Of Service

7.5

CVSS Score
3.1

Basic Information

EPSS Score
0.38169%
Published
5/18/2021
Updated
5/16/2023
KEV Status
No
Technology
TechnologyRuby

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
pumarubygems<= 4.3.74.3.8
pumarubygems>= 5.0.0, <= 5.3.05.3.1

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot 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.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

T*is vuln*r**ility is r*l*t** to [*V*-****-*****](*ttps://*it*u*.*om/pum*/pum*/s**urity/**visori*s/**S*-*xx*-m***-x***). ### Imp**t T** *ix *or *V*-****-***** w*s in*ompl*t*. T** ori*in*l *ix only prot**t** *xistin* *onn**tions t**t *** *lr***y ***

Reasoning

T** vuln*r**ility st*ms *rom in*ompl*t* **n*lin* o* k**p*liv* *onn**tions in Pum*'s r*qu*st pro**ssin* loop. T** *it p*t** s*ows mo*i*i**tions in li*/pum*/s*rv*r.r* *roun* t** r*qu*st *ount*r *n* k**p*liv* m*n***m*nt lo*i*. T** ori*in*l *o** *i*n't p