When a user invokes curl using a schemeless URL combined with
--proto-default sftp (or scp), a disconnect occurs between the tool layer
and libcurl. The tool layer incorrectly infers the URL scheme, which
erroneously bypasses the initialization of critical SSH security options like
CURLOPTSSHHOSTPUBLICKEYSHA256 and CURLOPTSSHKNOWNHOSTS. Conversely, the
libcurl runtime successfully honors CURLOPTDEFAULT_PROTOCOL and establishes
the connection via SFTP/SCP as specified. Because the tool layer skipped the
security configuration, these SSH host verification options are silently
omitted, causing curl to connect to an unverified SSH remote host without
throwing an error.
{
"package": "curl",
"URL": "https://curl.se/docs/CVE-2026-12064.json",
"last_affected": "8.20.0",
"issue": "https://hackerone.com/reports/3797526",
"affects": "tool",
"severity": "Low",
"www": "https://curl.se/docs/CVE-2026-12064.html",
"CWE": {
"desc": "Improper Validation of Certificate with Host Mismatch",
"id": "CWE-297"
}
}"https://curl.se/docs/CURL-CVE-2026-12064.json"
"2026-06-24T08:07:07Z"
[
{
"target": {
"file": "src/config2setopts.c",
"function": "url_proto_and_rewrite"
},
"id": "CURL-CVE-2026-12064-b3eb1e8d",
"source": "https://github.com/curl/curl.git/commit/ab3bb8cd8be8f9d4acb97da0418abc279182041e",
"signature_type": "Function",
"deprecated": false,
"digest": {
"length": 1136.0,
"function_hash": "93882114240828177653085948016490702110"
},
"signature_version": "v1"
},
{
"target": {
"file": "src/config2setopts.c"
},
"id": "CURL-CVE-2026-12064-d5619c82",
"source": "https://github.com/curl/curl.git/commit/ab3bb8cd8be8f9d4acb97da0418abc279182041e",
"signature_type": "Line",
"deprecated": false,
"digest": {
"threshold": 0.9,
"line_hashes": [
"140522849194369262228739833591374391075",
"47558339863403131453033268292745221021",
"15975670465097192282932354355781322912",
"220902106392793621708295317072227537429",
"198975573407202876764184453290488326371",
"3746734021152446245522935287251443430",
"170664250380509585141008070840604764918",
"161765996811876613295849122885315630101",
"5374207038386086385366965339124772674",
"261071834960052502162471400348777792193",
"315214669734780166251393141450779423952",
"11348971201187702211989874254882715935",
"304598240625625498609896974683940486911",
"176332074864481965282682475802544330239",
"61413842227513765548216582872062936189",
"152095212190975018695576316498032629201",
"12824638474895083873042971640073707981",
"147131897269297204095220721174340290043",
"201687314332511709623400018059706721695",
"304787371272254069598680308305763126609",
"293436386607034365026241199574672026404",
"169057705388842471260387887033403810014",
"136995815859804498330318491255401917183",
"48843095567586818894551844502984755450",
"119204995110705058858166647734024530825"
]
},
"signature_version": "v1"
}
]