AMPHP Denial of Service via HTTP/2 CONTINUATION Frames
The advisory, in context
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 for reporting the vulnerability.
Affected packages
Start with the recorded fix for your release branch. Check your installed version and test compatibility before upgrading. Fixing this advisory does not rule out other vulnerabilities in the release.
From 2.0.0 before 2.1.1
Fixed in 2.1.1
2 explicitly affected versions
v2.0.0, v2.1.0
View affected-version evidence
{
"ranges": [
{
"events": [
{
"introduced": "2.0.0"
},
{
"fixed": "2.1.1"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"v2.0.0",
"v2.1.0"
]
}Earlier releases before 1.7.3
Fixed in 1.7.3
15 explicitly affected versions
v1.0.0, v1.0.1, v1.1.0, v1.2.0, v1.3.0, v1.4.0, v1.5.0, v1.6.0, v1.6.0-rc1, v1.6.1, v1.6.2, v1.6.3, v1.7.0, v1.7.1, v1.7.2
View affected-version evidence
{
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.7.3"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"v1.0.0",
"v1.0.1",
"v1.1.0",
"v1.2.0",
"v1.3.0",
"v1.4.0",
"v1.5.0",
"v1.6.0",
"v1.6.0-rc1",
"v1.6.1",
"v1.6.2",
"v1.6.3",
"v1.7.0",
"v1.7.1",
"v1.7.2"
]
}From 4.0.0-rc10 through 4.0.0 (inclusive)
No fix recorded for this interval.
3 explicitly affected versions
v4.0.0, v4.0.0-rc10, v4.0.0-rc11
View affected-version evidence
{
"ranges": [
{
"events": [
{
"introduced": "4.0.0-rc10"
},
{
"last_affected": "4.0.0"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"v4.0.0",
"v4.0.0-rc10",
"v4.0.0-rc11"
]
}References
- https://github.com/amphp/http-client/security/advisories/GHSA-w8gf-g2vq-j2f4
- https://github.com/amphp/http/security/advisories/GHSA-qjfw-cvjf-f4fm
- https://nvd.nist.gov/vuln/detail/CVE-2024-2653
- https://github.com/amphp/http/commit/3a33e68a3b53f7279217238e89748cf0cb30b8a6
- https://github.com/amphp/http/commit/881cc33da236fbcd0cb0cf6c2bfc7efcf80ede76
- https://github.com/FriendsOfPHP/security-advisories/blob/master/amphp/http-client/CVE-2024-2653.yaml
- https://github.com/FriendsOfPHP/security-advisories/blob/master/amphp/http/CVE-2024-2653.yaml
- https://github.com/amphp/http
- https://www.kb.cert.org/vuls/id/421644
- http://www.openwall.com/lists/oss-security/2024/04/03/16