curl supports "chained" HTTP compression algorithms, meaning that a server response can be compressed multiple times and potentially with different algorithms. The number of acceptable "links" in this "decompression chain" was capped, but the cap was implemented on a per-header basis allowing a malicious server to insert a virtually unlimited number of compression steps simply by using many headers.
The use of such a decompression chain could result in a "malloc bomb", making curl end up spending enormous amounts of allocated heap memory, or trying to and returning out of memory errors.
{
"issue": "https://hackerone.com/reports/1826048",
"package": "curl",
"last_affected": "7.87.0",
"www": "https://curl.se/docs/CVE-2023-23916.html",
"CWE": {
"id": "CWE-770",
"desc": "Allocation of Resources Without Limits or Throttling"
},
"award": {
"amount": "2400",
"currency": "USD"
},
"affects": "both",
"severity": "Medium",
"URL": "https://curl.se/docs/CVE-2023-23916.json"
}[
{
"signature_version": "v1",
"deprecated": false,
"target": {
"function": "Curl_build_unencoding_stack",
"file": "lib/content_encoding.c"
},
"digest": {
"function_hash": "236136722379571766480436126468880933004",
"length": 1391.0
},
"source": "https://github.com/curl/curl.git/commit/119fb187192a9ea13dc90d9d20c215fc82799ab9",
"signature_type": "Function",
"id": "CURL-CVE-2023-23916-04d4e0af"
},
{
"signature_version": "v1",
"deprecated": false,
"target": {
"file": "lib/content_encoding.c"
},
"digest": {
"line_hashes": [
"225682655952001326715220674207391006600",
"285785662562700632386988265942516493028",
"203103347077643510629770777772191475331",
"281980678149956129927863230221465799883",
"114552470392839331261066750353470777076",
"309703287710777946316441318192642982340",
"226005546279310649221062165644729979516",
"269037724858927312323434386765073202848",
"318480930092771807115527444739740201889",
"13531748173703579674894831209765224433"
],
"threshold": 0.9
},
"source": "https://github.com/curl/curl.git/commit/119fb187192a9ea13dc90d9d20c215fc82799ab9",
"signature_type": "Line",
"id": "CURL-CVE-2023-23916-399d64d5"
},
{
"signature_version": "v1",
"deprecated": false,
"target": {
"file": "lib/urldata.h"
},
"digest": {
"line_hashes": [
"314691222874946517552656372691008466937",
"169853910395093266110753057715160474849",
"189328306042192910930881936581626190490",
"27503069412827551803451655498114064704"
],
"threshold": 0.9
},
"source": "https://github.com/curl/curl.git/commit/119fb187192a9ea13dc90d9d20c215fc82799ab9",
"signature_type": "Line",
"id": "CURL-CVE-2023-23916-d069efcb"
}
]