CVE-2019-16770: Puma Denial of Service Vulnerability

MODERATE
Advisory Identifier: GHSA-7xx3-m584-x994
CVSS 5.3
CWE-770
Published
Advisory Summary

CVE-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

CVE Identifier CVE-2019-16770
GHSA Identifier GHSA-7xx3-m584-x994
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-770: Allocation of Resources Without Limits or Throttling
Affected Product Puma
Package Ecosystem RubyGems
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability Low (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.

puma fixed: 3.12.2
Upgrade puma to 3.12.2
puma fixed: 4.3.1
Upgrade puma to 4.3.1
Verify Direct and Transitive Dependencies

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

## Keepalive thread overload/DoS ### Impact A poorly-behaved client could use keepalive requests to monopolize Puma's reactor and create a denial of service attack. If more keepalive connections to Puma are opened than there are threads available, additional connections will wait permanently if the attacker sends requests frequently enough. ### Patches This vulnerability is patched in Puma 4.3.1 and 3.12.2. ### Workarounds Reverse 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. ### For more information If you have any questions or comments about this advisory: * Open an issue at [puma](github.com/puma/puma).

CVE-2019-16770 Affected Puma Versions

2 component(s)
Fixed Versions:
3.12.24.3.1
Product / Package Ecosystem Affected Versions Fixed Version
puma
RubyGems
< 3.12.2
3.12.2
puma
RubyGems
≥ 4.0.0
< 4.3.1
4.3.1

References

Frequently Asked Questions

What is CVE-2019-16770?
CVE-2019-16770 is a security vulnerability in Puma involving A poorly-behaved client could use keepalive requests to monopolize Puma's reactor and create a denial of service attack under CWE-770: Allocation of Resources Without Limits or Throttling.
Which Puma versions are affected?
Affected versions include releases prior to 3.12.2, 4.3.1 across affected packages: puma.
What version fixes CVE-2019-16770?
Upgrading to 3.12.2, 4.3.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is puma affected?
Yes, puma is affected in releases prior to 3.12.2, 4.3.1. Upgrade your dependency to 3.12.2, 4.3.1 or later.
What is the CVSS score of CVE-2019-16770?
CVE-2019-16770 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L.
What CWE is associated with CVE-2019-16770?
CVE-2019-16770 is classified under CWE-770: Allocation of Resources Without Limits or Throttling (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.).
How can I check RubyGems dependencies for CVE-2019-16770?
Run the dependency tree command: 'inspect dependencies for puma'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}