REDHAT-BUG-2550675: Low severity curl curl vulnerability

Published Oct 13, 2026
·
Updated

knownhost callback mismatches key as missing ============================================

Project curl Security Advisory, October 14 2026 Permalink

VULNERABILITY -------------

When libcurl uses libssh2 with a hashed knownhosts file, an unrelated initial entry can cause host key validation to report a key mismatch as a missing key to the CURLOPTSSHKEYFUNCTION callback.

INFO ----

A network attacker who controls or intercepts the reached SSH endpoint can make an already pinned host appear genuinely new to a trust-on-first-use callback. libcurl then authenticates to the hostile endpoint; in the proof, the server receives the configured SSH password and libcurl accepts attacker-controlled SFTP data. The default callback and curl command-line tool are not claimed affected.

This problem only affects libcurl built with the libssh2 backend for SFTP and SCP transfers.

The Common Vulnerabilities and Exposures (CVE) project has assigned the name CVE-2026-87865 to this issue.

CWE-295: Improper Certificate Validation

Severity: Low

AFFECTED VERSIONS -----------------

- Affected versions: curl 7.69.1 to and including 8.22.0 - Not affected versions: curl < 7.69.1 and >= 8.23.0 - Introduced-in: https://github.com/curl/curl/commit/e96fe70cabcb3a5a009821d

libcurl is used by many applications, but not always advertised as such!

This flaw does not affect the curl command line tool.

SOLUTION ------------

- Fixed-in: https://github.com/curl/curl/commit/323c184b6bdf5b1988a10c0a61560

RECOMMENDATIONS --------------

A - Upgrade curl to version 8.23.0

B - Apply the patch to your local version

C - Avoid the libssh2 backend for SFTP and SCP

TIMELINE --------

This issue was reported to the curl project on August 28, 2026.

curl 8.23.0 was released on October 14, 2026, coordinated with the publication of this advisory.

CREDITS -------

- Reported-by: Bobbeh Rhino - Patched-by: Bobbeh Rhino

Thanks a lot!

Affected Software

1 affected component
curl curl>=7.69.1<=8.22.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 8.23.0
  2. Configuration

    Avoid the libssh2 backend for SFTP and SCP.

    libcurl SSH backend for SFTP and SCP = avoid libssh2

Event History

Oct 13, 2026
Data Sourced
via Red Hat·04:27 PM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

Which deployments are exposed to this issue?

Only libcurl deployments built with the libssh2 backend and performing SFTP or SCP transfers are affected. The issue requires use of a hashed known_hosts file and a CURLOPT_SSH_KEYFUNCTION callback that treats a missing key as acceptable under trust-on-first-use behavior.

2

What does an attacker need to exploit it?

An attacker must control or intercept the SSH endpoint reached by the client. They can then cause a pinned host key to be reported to the callback as missing rather than mismatched, potentially leading the callback to trust the hostile endpoint.

3

Are the curl command-line tool or the default callback affected?

They are not claimed to be affected. The advisory specifically identifies the risk in applications using a custom CURLOPT_SSH_KEYFUNCTION callback.

4

What is the potential impact of successful exploitation?

libcurl may authenticate to the attacker-controlled SSH endpoint. In the described proof, the hostile server received the configured SSH password and libcurl accepted attacker-controlled SFTP data.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203