CVE-2019-16770: Puma Denial of Service Vulnerability
MODERATECVE-2019-16770 is a MODERATE (CVSS 5.3) denial of service vulnerability (CWE-770: Allocation of Resources Without Limits or Throttling) affecting Puma libraries in the RubyGems ecosystem. The issue involves a poorly-behaved client could use keepalive requests to monopolize puma's reactor and create a denial of service attack. Remediation is available by upgrading affected packages to version 3.12.2, 4.3.1.
CVE-2019-16770 at a Glance
Security Impact
CVSS: 5.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L).
How to Fix CVE-2019-16770
To remediate this vulnerability, upgrade all affected Puma dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade puma to 3.12.2
Upgrade puma to 4.3.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for puma
How to Check if You Are Affected
To determine whether your application is affected by CVE-2019-16770, inspect your project dependencies for Puma:
inspect dependencies for puma
Analyze the terminal output to locate any version of Puma in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.12.2), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-770: Allocation of Resources Without Limits or Throttling, where the product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated. In Puma, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2019-16770 Affected Puma Versions
2 component(s)References
Frequently Asked Questions
What is CVE-2019-16770?
Which Puma versions are affected?
What version fixes CVE-2019-16770?
Is puma affected?
What is the CVSS score of CVE-2019-16770?
What CWE is associated with CVE-2019-16770?
How can I check RubyGems dependencies for CVE-2019-16770?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-7xx3-m584-x994",
"modified" : "2021-01-08T19:12:47Z",
"published" : "2019-12-05T19:26:37Z",
"aliases" : [ "CVE-2019-16770" ],
"summary" : "A poorly-behaved client could use keepalive requests to monopolize Puma's reactor and create a denial of service attack",
"details" : "## Keepalive thread overload/DoS\n\n### Impact\n\nA poorly-behaved client could use keepalive requests to monopolize Puma's reactor and create a denial of service attack.\n\nIf more keepalive connections to Puma are opened than there are threads available, additional connections will wait permanently if the attacker sends requests frequently enough.\n\n### Patches\n\nThis vulnerability is patched in Puma 4.3.1 and 3.12.2.\n\n### Workarounds\n\nReverse proxies in front of Puma could be configured to always allow less than X keepalive connections to a Puma cluster or process, where X is the number of threads configured in Puma's thread pool.\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n\n* Open an issue at [puma](github.com/puma/puma).",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "RubyGems",
"name" : "puma"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.12.2"
} ]
} ]
}, {
"package" : {
"ecosystem" : "RubyGems",
"name" : "puma"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.0.0"
}, {
"fixed" : "4.3.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/puma/puma/security/advisories/GHSA-7xx3-m584-x994"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2019-16770"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-7xx3-m584-x994"
}, {
"type" : "WEB",
"url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/puma/CVE-2019-16770.yml"
}, {
"type" : "WEB",
"url" : "https://lists.debian.org/debian-lts-announce/2022/05/msg00034.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-770" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2020-06-16T21:23:51Z",
"nvd_published_at" : "2019-12-05T20:15:00Z"
}
}