When libcurl uses libssh2 with a hashed known_hosts file, an unrelated
initial entry can cause host key validation to report a key mismatch as a
missing key to the CURLOPT_SSH_KEYFUNCTION callback.
{
"CWE": {
"desc": "Improper Certificate Validation",
"id": "CWE-295"
},
"URL": "https://curl.se/docs/CVE-2026-87865.json",
"affects": "both",
"issue": "https://hackerone.com/reports/3975408",
"last_affected": "8.22.0",
"package": "curl",
"severity": "Low",
"www": "https://curl.se/docs/CVE-2026-87865.html"
}"https://curl.se/docs/CURL-CVE-2026-87865.json"
[
{
"deprecated": false,
"digest": {
"line_hashes": [
"5702662798046728584313952421750973160",
"202534345375092530488621442962458175438",
"263912510949158082883963750255407488814",
"205112045761851138696299861521993606695",
"37685542541009928423447540252806687242",
"75407180318704451699303769443305508093"
],
"threshold": 0.9
},
"id": "CURL-CVE-2026-87865-683de849",
"signature_type": "Line",
"signature_version": "v1",
"source": "https://github.com/curl/curl.git/commit/323c184b6bdf5b1988a10c0a61560666e1588149",
"target": {
"file": "lib/vssh/libssh2.c"
}
},
{
"deprecated": false,
"digest": {
"function_hash": "50640757737372994581328470495395855929",
"length": 2789
},
"id": "CURL-CVE-2026-87865-91a95df3",
"signature_type": "Function",
"signature_version": "v1",
"source": "https://github.com/curl/curl.git/commit/323c184b6bdf5b1988a10c0a61560666e1588149",
"target": {
"file": "lib/vssh/libssh2.c",
"function": "ssh_force_knownhost_key_type"
}
}
]
"2026-10-14T19:02:59Z"