proto-default skips SSH verification
curl
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| curl curl |
| No fix yet |
| curl curl |
| No fix yet |
| curl curl |
|
curl
| Product | Affected | Fixed in |
|---|---|---|
| curl curl |
| No fix yet |
| curl curl |
| No fix yet |
| curl curl |
|
8.19.08.18.08.17.08.16.08.15.0| No fix yet |
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.
From the CVE record · curl
When curl is invoked with a schemeless URL and `--proto-default` set to `sftp` or `scp`, its tool layer skips configuring SSH host verification even though libcurl establishes the SFTP/SCP connection. Curl can then connect to an unverified remote SSH host without an error. This requires a user to invoke curl with that combination of options; the input does not specify an authentication requirement.
Anyone running curl should check whether they use schemeless URLs with `--proto-default sftp` or `--proto-default scp`; affected versions were not specified.