Skip to main content
Vulnerability Database/CVE-2026-86410

CVE-2026-86410: curl SSH Host Verification Bypass Flaw

CVE-2026-86410 is an SSH host verification bypass flaw in curl that fails to apply verification options when following redirects. This post explains its technical details, affected versions, and mitigation steps.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-86410 Overview

CVE-2026-86410 is a logic flaw in the curl command line tool affecting Secure Shell (SSH) host key verification. The curl client only applies SSH host verification options when the user directly initiates an SFTP or SCP transfer. When curl follows an HTTP redirect that lands on an SFTP or SCP URL, those verification options are not applied. This gap allows the client to connect to an SSH server without validating the server's host key, weakening transport authenticity for redirected transfers.

Critical Impact

Attackers controlling a redirect target can present an unverified SSH host key, enabling potential man-in-the-middle interception of SFTP or SCP sessions established through redirects.

Affected Products

  • curl command line tool (SSH/SFTP/SCP transfer logic)
  • libcurl-based workflows that enable protocol redirects to SFTP/SCP
  • Automated scripts and build pipelines that use curl -L against SSH-backed URLs

Discovery Timeline

  • 2026-10-20 - CVE-2026-86410 published to NVD
  • 2026-10-22 - Last updated in NVD database

Technical Details for CVE-2026-86410

Vulnerability Analysis

The flaw resides in the curl command line tool's option-handling logic for SSH-based protocols. When a user invokes curl directly with an sftp:// or scp:// URL, the tool applies host key verification options such as --hostpubsha256 or --hostpubmd5. When curl follows a redirect returned by a prior request, the SSH host verification options are not propagated to the redirected SSH session.

The result is an SSH connection established without validating the remote server's host key fingerprint. An attacker who can influence a redirect destination can route the client to an attacker-controlled SSH endpoint. The client then negotiates the SSH session without the fingerprint check the user requested.

Root Cause

The root cause is a missing propagation of SSH host verification settings across the redirect code path. The verification options are bound to the initial command line parsing stage rather than enforced at the SSH connection stage. Protocol handoff during redirect follow bypasses the enforcement point. This is a configuration and design flaw in the SSH connection setup logic, not a memory safety issue.

Attack Vector

Exploitation requires an attacker to control or influence an HTTP(S) response that redirects to an sftp:// or scp:// URL. The victim must invoke curl with redirect-following enabled, typically via -L or --location. When curl follows the redirect to the SSH target, it connects without applying the fingerprint check, allowing a malicious or substituted SSH server to accept the session and intercept credentials or data.

No verified public exploit code is available. See the curl.se CVE-2026-86410 Advisory and HackerOne Report #3973176 for the vendor's technical description.

Detection Methods for CVE-2026-86410

Indicators of Compromise

  • Outbound SSH, SFTP, or SCP connections originating from processes that normally issue only HTTP or HTTPS traffic, such as build agents or update scripts.
  • HTTP responses with 3xx status codes whose Location header rewrites the scheme to sftp:// or scp://.
  • SSH session logs showing new or unexpected host key fingerprints presented to curl-initiated clients.

Detection Strategies

  • Inspect proxy and web gateway logs for redirects that change the URL scheme to SSH-family protocols.
  • Audit shell history and CI/CD job definitions for curl -L or curl --location invocations that may traverse redirects into SFTP or SCP endpoints.
  • Correlate process telemetry showing curl spawning SSH subprocesses or opening TCP/22 sockets following an HTTPS request.

Monitoring Recommendations

  • Alert on curl processes initiating TCP/22 connections immediately after HTTP(S) activity to the same parent process.
  • Monitor known_hosts files on automation hosts for unexpected additions tied to redirected transfers.
  • Track curl versions deployed across endpoints and pipeline runners to measure patch coverage.

How to Mitigate CVE-2026-86410

Immediate Actions Required

  • Upgrade curl to the fixed release identified in the curl.se CVE-2026-86410 Advisory as soon as it is published.
  • Audit all scripts and automation that pass -L or --location to curl against SSH-reachable targets, and disable redirect following where it is not required.
  • Restrict allowed redirect protocols using --proto-redir to exclude sftp and scp for workflows that must retain redirect handling.

Patch Information

The curl project tracks the fix in the official advisory at curl.se CVE-2026-86410 Advisory and the structured curl.se CVE-2026-86410 JSON Details. Package maintainers should rebuild downstream curl and libcurl packages against the patched upstream source once released. Verify the installed version on all endpoints after patch rollout using curl --version.

Workarounds

  • Invoke SFTP and SCP transfers directly without an intermediate HTTP(S) redirect so host verification options bind to the connection.
  • Pin the expected host key with --hostpubsha256 and refuse to proceed when the fingerprint cannot be verified at the session level.
  • Disable redirect following with explicit flag removal in scripts that fetch from untrusted sources.
bash
# Configuration example
# Restrict curl redirect protocols to HTTP/HTTPS only
curl -L --proto-redir =https,http https://example.com/resource

# Direct SFTP transfer with host key pinning (not subject to the flaw)
curl --hostpubsha256 <BASE64_SHA256> sftp://sftp.example.com/path/file

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.