Skip to content
OpenAdvisories
High · 7.5 CVE-2021-29509 EUVD-2021-1158GHSA-q28m-8xjw-8vr5

Keepalive Connections Causing Denial Of Service in puma

Published May 11, 2021 · Updated Aug 3, 2024 · Assigned by GitHub_M

Description

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.

Affected products

VendorProductAffectedFixed
puma puma < 4.3.8, >= 5.0.0, < 5.3.1 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 puma 4.3.8-1 —
Debian 13 puma 4.3.8-1 —
Debian 12 puma 4.3.8-1 —
Debian 10 puma 3.12.0-2+deb10u3 DLA-3083-1
ReleasePackageFixed inAdvisory
Red Hat Satellite Capsule 6 foreman 2.5.2.17-2.el7sat RHSA-2021:4702
Red Hat Satellite Capsule 6 python-aiohttp 3.7.4-1.el7pc RHSA-2021:4702
Red Hat Satellite Capsule 6 python-ecdsa +1 0.13.3-2.el7pc RHSA-2021:4702
Red Hat Satellite Capsule 6 python-pyyaml +1 5.4.1-1.el7pc RHSA-2021:4702
Red Hat Satellite Capsule 6 python-urllib3 +1 1.26.5-1.el7pc RHSA-2021:4702
Red Hat Satellite Capsule 6 python3-django 2.2.24-1.el7pc RHSA-2021:4702
Red Hat Satellite Capsule 6 satellite +1 6.10.0-3.el7sat RHSA-2021:4702
Red Hat Satellite Capsule 6 tfm-rubygem-nokogiri 1.11.3-2.el7sat RHSA-2021:4702
Red Hat Satellite 6 candlepin 4.0.9-1.el7sat RHSA-2021:4702
Red Hat Satellite 6 foreman 2.5.2.17-2.el7sat RHSA-2021:4702
Red Hat Satellite 6 python-aiohttp 3.7.4-1.el7pc RHSA-2021:4702
Red Hat Satellite 6 python-ecdsa +1 0.13.3-2.el7pc RHSA-2021:4702
Red Hat Satellite 6 python-pyyaml +1 5.4.1-1.el7pc RHSA-2021:4702
Red Hat Satellite 6 python-urllib3 +1 1.26.5-1.el7pc RHSA-2021:4702
Red Hat Satellite 6 python3-django 2.2.24-1.el7pc RHSA-2021:4702
Red Hat Satellite 6 satellite 6.10.0-3.el7sat RHSA-2021:4702
Red Hat Satellite 6 tfm-rubygem-activerecord-session_store 2.0.0-1.el7sat RHSA-2021:4702
Red Hat Satellite 6 tfm-rubygem-addressable 2.8.0-1.el7sat RHSA-2021:4702
Red Hat Satellite 6 tfm-rubygem-nokogiri 1.11.3-2.el7sat RHSA-2021:4702
Red Hat Satellite 6 tfm-rubygem-puma 5.3.2-1.el7sat RHSA-2021:4702
Red Hat Satellite 6 tfm-rubygem-rails +1 6.0.3.7-1.el7sat RHSA-2021:4702
ReleasePackageFixed inAdvisory
SLES 15 SP3 rubygem-puma 4.3.11-150000.3.6.2 SUSE-SU-2022:1515-1
SLES 15 SP2 rubygem-puma 4.3.11-150000.3.6.2 SUSE-SU-2022:1515-1
SLES 15 SP1 rubygem-puma 4.3.11-150000.3.6.2 SUSE-SU-2022:1515-1
SLES 15 rubygem-puma 4.3.11-150000.3.6.2 SUSE-SU-2022:1515-1
Show 2 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SUSE OpenStack Cloud Crowbar 9 rubygem-puma 2.16.0-4.12.1 SUSE-SU-2021:2914-1
SUSE OpenStack Cloud Crowbar 8 rubygem-puma 2.16.0-3.12.1 SUSE-SU-2021:2761-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed ruby3.2-rubygem-puma-5 5.6.5-1.7 openSUSE-SU-2024:13166-1
openSUSE Tumbleweed rubygem-puma-5 5.6.5-1.1 openSUSE-SU-2024:13721-1, openSUSE-SU-2024:12592-1
openSUSE Leap 15.4 rubygem-puma 4.3.11-150000.3.6.2 SUSE-SU-2022:1515-1
openSUSE Leap 15.3 rubygem-puma 4.3.11-150000.3.6.2 SUSE-SU-2022:1515-1

Affected packages

EcosystemPackageAffectedFixedRecord
RubyGems puma < 4.3.8 4.3.8 GHSA-q28m-8xjw-8vr5
RubyGems puma >= 5.0.0, < 5.3.1 5.3.1 GHSA-q28m-8xjw-8vr5

Advisories 8

References