The curl URL parser wrongly accepts percent-encoded URL separators like '/' when decoding the hostname part of a URL, making it a different URL using the wrong hostname when it is later retrieved.
For example, a URL like http://example.com%2F10.0.0.1/, would be allowed by
the parser and get transposed into http://example.com/10.0.0.1/. This flaw
can be used to circumvent filters, checks and more.
{
"last_affected": "7.83.0",
"severity": "Medium",
"package": "curl",
"award": {
"amount": "2400",
"currency": "USD"
},
"CWE": {
"desc": "Improper Handling of URL Encoding",
"id": "CWE-177"
},
"URL": "https://curl.se/docs/CVE-2022-27780.json",
"affects": "both",
"www": "https://curl.se/docs/CVE-2022-27780.html",
"issue": "https://hackerone.com/reports/1553841"
}[
{
"signature_version": "v1",
"signature_type": "Function",
"digest": {
"length": 1399.0,
"function_hash": "175578244964680735291736576270402210988"
},
"deprecated": false,
"source": "https://github.com/curl/curl.git/commit/914aaab9153764ef8fa4178215b8ad89d3ac263a",
"target": {
"function": "hostname_check",
"file": "lib/urlapi.c"
},
"id": "CURL-CVE-2022-27780-5e408e0f"
},
{
"signature_version": "v1",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"199957627763592549612385795254149834550",
"151428187081067779662697927472516771049",
"119160317506403307842112826299814095034",
"25289416254833179104566548130852379552"
]
},
"deprecated": false,
"source": "https://github.com/curl/curl.git/commit/914aaab9153764ef8fa4178215b8ad89d3ac263a",
"target": {
"file": "lib/urlapi.c"
},
"id": "CURL-CVE-2022-27780-fb7e3e79"
}
]