CVE-2026-12064

proto-default skips SSH verification

Published Jul 3, 2026 CVSS 3.1 · 7.5 High EPSS < 1% KEV · Not listed
Description
When a user invokes curl using a schemeless URL combined with
`--proto-default` sftp (or scp), a disconnect occurs between the tool layer
and libcurl. The tool layer incorrectly infers the URL scheme, which
erroneously bypasses the initialization of critical SSH security options like
CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256 and CURLOPT_SSH_KNOWNHOSTS. Conversely, the
libcurl runtime successfully honors CURLOPT_DEFAULT_PROTOCOL and establishes
the connection via SFTP/SCP as specified. Because the tool layer skipped the
security configuration, these SSH host verification options are silently
omitted, causing curl to connect to an unverified SSH remote host without
throwing an error.

Analysis

AI-generated

Technical impact

Curl misinterprets a schemeless URL when the --proto-default option is set to sftp or scp, causing the tool layer to omit critical SSH security options and resulting in an improper certificate validation (CWE-295), an insecure authentication scenario (CWE-297), and a failure to enforce secure communication principles (CWE-358). The client silently suppresses the SSH host key verification that would normally guard against man‑in‑the‑middle attacks, allowing an attacker to intercept or alter data transferred to an unverified remote host.

Affected Systems

All builds of curl that implement the --proto-default option for sftp or scp and accept schemeless URLs are vulnerable. Because no specific version ranges are listed, any current release supporting this feature should be treated as at risk until the fix is applied.

Risk and Exploitability

The CVSS score of 7.5 indicates a high severity vulnerability. The exploitability is low, with an EPSS score of less than 1%, and the issue is not listed in the CISA KEV catalog. The vulnerability requires an attacker to control or provide the remote SSH host to successfully intercept traffic. An attacker could exploit the bypassed host key verification to perform a man‑in‑the‑middle attack, but active exploitation evidence is not reported.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade curl to the latest release that includes the fix for the --proto-default bug.
  • Avoid using --proto-default with scheme‑less URLs for sftp or scp; instead specify an explicit scheme such as sftp:// or scp://.
  • If an upgrade cannot be performed immediately, do not use the affected mode; enforce host key verification by configuring the SSH client separately or by preventing the use of insecure connections.

Generated by OpenCVE AI on September 21, 2026 at 07:23 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Ubuntu USN Ubuntu USN USN-8525-1 curl vulnerabilities
History
Type Values Removed Values Added
Weaknesses CWE-297
Type Values Removed Values Added
Weaknesses CWE-760
Type Values Removed Values Added
Weaknesses CWE-760
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N'}

ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Weaknesses CWE-287
Type Values Removed Values Added
Weaknesses CWE-287
Type Values Removed Values Added
Weaknesses CWE-287
Type Values Removed Values Added
Weaknesses CWE-287
Type Values Removed Values Added
Weaknesses CWE-287
Type Values Removed Values Added
Weaknesses CWE-287
Type Values Removed Values Added
First Time appeared Curl
Curl curl
Vendors & Products Curl
Curl curl
Type Values Removed Values Added
Description When a user invokes curl using a schemeless URL combined with `--proto-default` sftp (or scp), a disconnect occurs between the tool layer and libcurl. The tool layer incorrectly infers the URL scheme, which erroneously bypasses the initialization of critical SSH security options like CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256 and CURLOPT_SSH_KNOWNHOSTS. Conversely, the libcurl runtime successfully honors CURLOPT_DEFAULT_PROTOCOL and establishes the connection via SFTP/SCP as specified. Because the tool layer skipped the security configuration, these SSH host verification options are silently omitted, causing curl to connect to an unverified SSH remote host without throwing an error.
Title proto-default skips SSH verification
References
Weaknesses
  • CWE-295

    Improper Certificate Validation

  • CWE-297

    Improper Validation of Certificate with Host Mismatch

  • CWE-358

    Improperly Implemented Security Check for Standard

Sources

Status
PUBLISHED
Assigner
curl
Published
Updated
Sep 15, 2026, 6:02 AM
Reserved
Jun 12, 2026, 7:23 AM
Status
Modified
Published
Jul 3, 2026, 7:16 AM
Modified
Sep 15, 2026, 7:16 AM
Severity
Important
Public date
Jul 3, 2026, 6:13 AM