# CVE-2026-12064: curl SSH host verification bypass via schemeless URLs and proto-default

Source: https://junglewise.ai/threats/cve-2026-12064-curl-ssh-host-verification-bypass-via-schemeless-urls-and-proto  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-03. Updated: 2026-07-03  
License: CC BY 4.0 with a link back

CVE-2026-12064 · Severity: info · CVSS 0 · Published 2026-07-03

A vulnerability in the curl command-line tool allows it to connect to remote servers via SFTP or SCP without verifying the server's identity. This occurs when a user provides a URL without a protocol prefix (like 'example.com' instead of 'sftp://example.com') while using the '--proto-default' setting. An attacker could perform a man-in-the-middle attack to intercept or modify data because the tool fails to check the server's security credentials.

## Quick answers

**Is CVE-2026-12064 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-12064 being exploited in the wild.

**How severe is CVE-2026-12064?** Informational severity, with a CVSS score of 0, published 3 July 2026.

**Which products and versions are affected?** curl curl 7.81.0 to 8.20.0.

**Is there a fix for CVE-2026-12064?** A patch was published on 2026-06-24: Fixed in curl version 8.21.0 Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-12064 attacked?** It is attacked over the network, in a web application.

**Am I affected by CVE-2026-12064?** Check whether anything you run is named in the advisory. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

A logic error exists in the curl command-line tool layer where it incorrectly infers the URL scheme for schemeless URLs when --proto-default is set to sftp or scp. While libcurl correctly establishes the connection using the intended protocol, the tool layer fails to initialize critical SSH security options, specifically CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256 and CURLOPT_SSH_KNOWNHOSTS. This results in the silent omission of host key verification, allowing connections to unverified SSH hosts. This issue affects the curl tool only and does not impact applications using the libcurl library directly.

## Affected products

- curl curl 7.81.0 to 8.20.0

## Timeline

- 2026-06-12: disclosed: Reported to the curl project via HackerOne
- 2026-06-24: patched: Fixed in curl version 8.21.0
- 2026-06-24: advisory: Project advisory published

## References

- [https://curl.se/docs/CVE-2026-12064.html](https://curl.se/docs/CVE-2026-12064.html)
- [https://curl.se/docs/CVE-2026-12064.json](https://curl.se/docs/CVE-2026-12064.json)
- [https://hackerone.com/reports/3797526](https://hackerone.com/reports/3797526)
