CVE-2026-87865knownhost callback mismatches key as missing
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.
What to do
Fixed builds are available from Alpine, Debian, Ubuntu: see the table below for the fixed version per release.
Debian has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | curl | Fixed | 8.20.0-2ubuntu11.1 | UBUNTU-CVE-2026-87865 |
| Ubuntu 26.04 | curl | Fixed | 8.18.0-1ubuntu2.8 | UBUNTU-CVE-2026-87865 |
| Ubuntu 24.04 | curl | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | curl | Not affected vulnerable_code_not_present | ||
| Debian 14 | curl | Fixed | 8.23.0~rc1-1 | DEBIAN-CVE-2026-87865 |
| Debian 13 | curl | Fix pending | DEBIAN-CVE-2026-87865 | |
| Debian 12 | curl | Fix pending | DEBIAN-CVE-2026-87865 | |
| Red Hat Enterprise Linux 10 | cargo | Not affected | ||
| Red Hat Enterprise Linux 10 | clippy | Not affected | ||
| Red Hat Enterprise Linux 10 | curl | Not affected | ||
| Red Hat Enterprise Linux 10 | igvm-devel | Not affected | ||
| Red Hat Enterprise Linux 10 | igvm-libs | Not affected | ||
| Red Hat Enterprise Linux 10 | libcurl | Not affected | ||
| Red Hat Enterprise Linux 10 | libcurl-devel | Not affected | ||
| Red Hat Enterprise Linux 10 | libcurl-minimal | Not affected | ||
| Red Hat Enterprise Linux 10 | rust | Not affected | ||
| Red Hat Enterprise Linux 10 | rust-analyzer | Not affected | ||
| Red Hat Enterprise Linux 10 | rust-debugger-common | Not affected | ||
| Red Hat Enterprise Linux 10 | rust-doc | Not affected | ||
| Red Hat Enterprise Linux 10 | rust-gdb | Not affected | ||
| Red Hat Enterprise Linux 10 | rust-lldb | Not affected | ||
| Red Hat Enterprise Linux 10 | rust-src | Not affected | ||
| Red Hat Enterprise Linux 10 | rust-std-static | Not affected | ||
| Red Hat Enterprise Linux 10 | rust-std-static-aarch64-unknown-none-softfloat | Not affected | ||
| Red Hat Enterprise Linux 10 | rust-std-static-wasm32-unknown-unknown | Not affected | ||
| Red Hat Enterprise Linux 10 | rust-std-static-wasm32-wasip1 | Not affected | ||
| Red Hat Enterprise Linux 10 | rust-std-static-x86_64-unknown-none | Not affected | ||
| Red Hat Enterprise Linux 10 | rust-toolset | Not affected | ||
| Red Hat Enterprise Linux 10 | rust-toolset-srpm-macros | Not affected | ||
| Red Hat Enterprise Linux 10 | rustfmt | Not affected | ||
| Red Hat Enterprise Linux 10 | s390utils | Not affected | ||
| Red Hat Enterprise Linux 10 | s390utils-base | Not affected | ||
| Red Hat Enterprise Linux 10 | s390utils-chreipl-fcp-mpath | Not affected | ||
| Red Hat Enterprise Linux 10 | s390utils-cmsfs-fuse | Not affected | ||
| Red Hat Enterprise Linux 10 | s390utils-core | Not affected | ||
| Red Hat Enterprise Linux 10 | s390utils-cpacfstatsd | Not affected | ||
| Red Hat Enterprise Linux 10 | s390utils-cpuplugd | Not affected | ||
| Red Hat Enterprise Linux 10 | s390utils-devel | Not affected | ||
| Red Hat Enterprise Linux 10 | s390utils-hmcdrvfs | Not affected | ||
| Red Hat Enterprise Linux 10 | s390utils-iucvterm | Not affected | ||
| Red Hat Enterprise Linux 10 | s390utils-mon_statd | Not affected | ||
| Red Hat Enterprise Linux 10 | s390utils-osasnmpd | Not affected | ||
| Red Hat Enterprise Linux 10 | s390utils-se-data | Not affected | ||
| Red Hat Enterprise Linux 10 | s390utils-zdsfs | Not affected | ||
| Red Hat Enterprise Linux 10 | s390utils-ziomon | Not affected | ||
| Red Hat Enterprise Linux 10 | snphost | Not affected | ||
| Red Hat Enterprise Linux 10 | trustee-kbs | Not affected | ||
| Red Hat Enterprise Linux 9 | cargo | Not affected | ||
| Red Hat Enterprise Linux 9 | clippy | Not affected | ||
| Red Hat Enterprise Linux 9 | curl | Not affected | ||
| Red Hat Enterprise Linux 9 | curl-minimal | Not affected | ||
| Red Hat Enterprise Linux 9 | libcurl | Not affected | ||
| Red Hat Enterprise Linux 9 | libcurl-devel | Not affected | ||
| Red Hat Enterprise Linux 9 | libcurl-minimal | Not affected | ||
| Red Hat Enterprise Linux 9 | rust | Not affected | ||
| Red Hat Enterprise Linux 9 | rust-analysis | Not affected | ||
| Red Hat Enterprise Linux 9 | rust-analyzer | Not affected | ||
| Red Hat Enterprise Linux 9 | rust-debugger-common | Not affected | ||
| Red Hat Enterprise Linux 9 | rust-doc | Not affected | ||
| Red Hat Enterprise Linux 9 | rust-gdb | Not affected | ||
| Red Hat Enterprise Linux 9 | rust-lldb | Not affected | ||
| Red Hat Enterprise Linux 9 | rust-src | Not affected | ||
| Red Hat Enterprise Linux 9 | rust-std-static | Not affected | ||
| Red Hat Enterprise Linux 9 | rust-std-static-wasm32-unknown-unknown | Not affected | ||
| Red Hat Enterprise Linux 9 | rust-std-static-wasm32-wasi | Not affected | ||
| Red Hat Enterprise Linux 9 | rust-std-static-wasm32-wasip1 | Not affected | ||
| Red Hat Enterprise Linux 9 | rust-toolset | Not affected | ||
| Red Hat Enterprise Linux 9 | rustfmt | Not affected | ||
| Red Hat Enterprise Linux 9 | snphost | Not affected | ||
| Red Hat Enterprise Linux 8 | curl | Not affected | ||
| Red Hat Enterprise Linux 8 | libcurl | Not affected | ||
| Red Hat Enterprise Linux 8 | libcurl-devel | Not affected | ||
| Red Hat Enterprise Linux 8 | libcurl-minimal | Not affected | ||
| Red Hat Enterprise Linux 7 | curl | Not affected | ||
| Red Hat Enterprise Linux 7 | libcurl | Not affected | ||
| Red Hat Enterprise Linux 7 | libcurl-devel | Not affected | ||
| Red Hat Enterprise Linux 6 | curl | Not affected | ||
| Red Hat Enterprise Linux 6 | libcurl | Not affected | ||
| Red Hat Enterprise Linux 6 | libcurl-devel | Not affected | ||
| Alpine Linux 3.24 | curl | Fixed | 8.23.0-r0 | ALPINE-CVE-2026-87865 |
| Alpine Linux 3.23 | curl | Fixed | 8.23.0-r0 | ALPINE-CVE-2026-87865 |
What the vendor says
As published in the CVE record by curl, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- curl: affected: 8.22.0 to 8.22.0, 8.21.0 to 8.21.0, 8.20.0 to 8.20.0, 8.19.0 to 8.19.0, 8.18.0 to 8.18.0, 8.17.0 to 8.17.0
References
- https://curl.se/docs/CVE-2026-87865.json
- https://curl.se/docs/CVE-2026-87865.html
- https://hackerone.com/reports/3975408
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.