CVE-2024-2653: Amphp/http Denial of Service Vulnerability

HIGH
Advisory Identifier: GHSA-qjfw-cvjf-f4fm
CVSS 8.2
Published
Advisory Summary

CVE-2024-2653 is a HIGH (CVSS 8.2) denial of service vulnerability (General Security Weakness) affecting Amphp/http libraries in the Packagist ecosystem. The issue involves amphp denial of service via http/2 continuation frames. Remediation is available by upgrading affected packages to version 2.1.1, 1.7.3.

CVE-2024-2653 at a Glance

CVE Identifier CVE-2024-2653
GHSA Identifier GHSA-qjfw-cvjf-f4fm
Severity HIGH
CVSS v3.1 Base Score 8.2
CWE Classification General Security Weakness
Affected Product Amphp/http
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 8.2

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:L/A:H).

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 Low (I:L)
Availability High (A:H)

How to Fix CVE-2024-2653

To remediate this vulnerability, upgrade all affected Amphp/http dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

amphp/http fixed: 2.1.1
Upgrade amphp/http to 2.1.1
amphp/http fixed: 1.7.3
Upgrade amphp/http to 1.7.3
amphp/http-client fixed: Latest secure release
Upgrade amphp/http-client to Latest secure release
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 amphp/http

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-2653, inspect your project dependencies for Amphp/http:

inspect dependencies for amphp/http

Analyze the terminal output to locate any version of Amphp/http in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.1.1), 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 General Security Weakness. In Amphp/http, 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

`amphp/http` will collect HTTP/2 `CONTINUATION` frames in an unbounded buffer and will not check the header size limit until it has received the `END_HEADERS` flag, resulting in an OOM crash. `amphp/http-client` and `amphp/http-server` are indirectly affected if they're used with an unpatched version of `amphp/http`. Early versions of `amphp/http-client` with HTTP/2 support (v4.0.0-rc10 to 4.0.0) are also directly affected. ## Acknowledgements Thank you to [Bartek Nowotarski](https://nowotarski.info/) for reporting the vulnerability.

CVE-2024-2653 Affected Amphp/http Versions

3 component(s)
Fixed Versions:
2.1.11.7.3
Product / Package Ecosystem Affected Versions Fixed Version
amphp/http
Packagist
≥ 2.0.0
< 2.1.1
2.1.1
amphp/http
Packagist
< 1.7.3
1.7.3
amphp/http-client
Packagist
≥ 4.0.0-rc10
≤ 4.0.0

References

Frequently Asked Questions

What is CVE-2024-2653?
CVE-2024-2653 is a security vulnerability in Amphp/http involving AMPHP Denial of Service via HTTP/2 CONTINUATION Frames under General Security Weakness.
Which Amphp/http versions are affected?
Affected versions include releases prior to 2.1.1, 1.7.3 across affected packages: amphp/http, amphp/http-client.
What version fixes CVE-2024-2653?
Upgrading to 2.1.1, 1.7.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is amphp/http affected?
Yes, amphp/http is affected in releases prior to 2.1.1, 1.7.3. Upgrade your dependency to 2.1.1, 1.7.3 or later.
Is amphp/http-client affected?
Yes, amphp/http-client is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2024-2653?
CVE-2024-2653 has a CVSS v3.1 base score of 8.2 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H.
What CWE is associated with CVE-2024-2653?
CVE-2024-2653 is classified under General Security Weakness.
How can I check Packagist dependencies for CVE-2024-2653?
Run the dependency tree command: 'inspect dependencies for amphp/http'. 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-qjfw-cvjf-f4fm",
  "modified" : "2024-05-02T18:58:15Z",
  "published" : "2024-04-03T18:06:45Z",
  "aliases" : [ "CVE-2024-2653" ],
  "summary" : "AMPHP Denial of Service via HTTP/2 CONTINUATION Frames",
  "details" : "`amphp/http` will collect HTTP/2 `CONTINUATION` frames in an unbounded buffer and will not check the header size limit until it has received the `END_HEADERS` flag, resulting in an OOM crash. `amphp/http-client` and `amphp/http-server` are indirectly affected if they're used with an unpatched version of `amphp/http`. Early versions of `amphp/http-client` with HTTP/2 support (v4.0.0-rc10 to 4.0.0) are also directly affected.\n\n## Acknowledgements\n\nThank you to [Bartek Nowotarski](https://nowotarski.info/) for reporting the vulnerability.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "amphp/http"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0.0"
      }, {
        "fixed" : "2.1.1"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.1.0"
    }
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "amphp/http"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.7.3"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 1.7.2"
    }
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "amphp/http-client"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.0.0-rc10"
      }, {
        "last_affected" : "4.0.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/amphp/http-client/security/advisories/GHSA-w8gf-g2vq-j2f4"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/amphp/http/security/advisories/GHSA-qjfw-cvjf-f4fm"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-2653"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/amphp/http/commit/3a33e68a3b53f7279217238e89748cf0cb30b8a6"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/amphp/http/commit/881cc33da236fbcd0cb0cf6c2bfc7efcf80ede76"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/amphp/http-client/CVE-2024-2653.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/amphp/http/CVE-2024-2653.yaml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/amphp/http"
  }, {
    "type" : "WEB",
    "url" : "https://www.kb.cert.org/vuls/id/421644"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2024/04/03/16"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-04-03T18:06:45Z",
    "nvd_published_at" : "2024-04-03T18:15:07Z"
  }
}