CVE-2022-3252
SwiftNIO Extras vulnerable to improper detection of complete HTTP body decompression
Reported by swift · Published September 21, 2022
github.com/apple/swift-nio-extras is fixed in 1.14.0, 1.10.3 and 1.9.2 (GitHub Packages)
Improper detection of complete HTTP body decompression SwiftNIO Extras provides a pair of helpers for transparently decompressing received HTTP request or response bodies. These two objects (HTTPRequestDecompressor and HTTPResponseDecompressor) both failed to detect when the decompressed body was considered complete. If trailing junk data was appended to the HTTP message body, the code would repeatedly attempt to decompress this data and fail. This would lead to an infinite loop making no forward progress, leading to livelock of the system and denial-of-service. This issue can be triggered by any attacker capable of sending a compressed HTTP message. Most commonly this is HTTP servers, as compressed HTTP messages cannot be negotiated for HTTP requests, but it is possible that users have configured decompression for HTTP requests as well. The attack is low effort, and likely to be reached without requiring any privilege or system access. The impact on availability is high: the process immediately becomes unavailable but does not immediately crash, meaning that it is possible for the process to remain in this state until an administrator intervenes or an automated circuit breaker fires. If left unchecked this issue will very slowly exhaust memory resources due to repeated buffer allocation, but the buffers are not written to and so it is possible that the processes will not terminate for quite some time. This risk can be mitigated by removing transparent HTTP message decompression. The issue is fixed by correctly detecting the termination of the compressed body as reported by zlib and refusing to decompress further data. The issue was found by Vojtech Rylko (https://github.com/vojtarylko) and reported publicly on GitHub.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| github.com/apple/swift-nio-extras | GitHub Packages | 1.14.0, 1.10.3, 1.9.2 |
| github.com/apple/swift-nio-extras | swiftpackageindex.com | 1.14.0, 1.10.3, 1.9.2 |
| SwiftNIO Extras | Swift Project | 1.14.0 |
| swift-nio-extras | apple | 1.14.0, 1.10.3, 1.9.2 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Swift Project | SwiftNIO Extras | unspecified |
| Swift Project | SwiftNIO Extras | * |
| github.com | apple/swift-nio-extras | 1.11.0, 1.10.0, 0 |
Timeline
- Sep 21, 2022 CVE Published
- Sep 22, 2022 EPSS Score (30 in total, the first dated here)
- Nov 21, 2024 CVE Updated
- Mar 17, 2026 Security Advisory
- Jun 24, 2026 Coalition ESS Score
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2022-3252
vulnetix vdb fixes CVE-2022-3252
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2022-3252/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- x_refsource_MISC
- https://nvd.nist.gov/vuln/detail/CVE-2022-3252 advisory
- https://github.com/advisories/GHSA-773g-x274-8qmf advisory
- https://github.com/apple/swift-nio-extras/pull/177 patch
- https://github.com/apple/swift-nio-extras/pull/177/commits/359015de2c49e426c27b1d25dbf599b08a9d3ee6 patch
- https://github.com/apple/swift-nio-extras url