curl: Improper Validation of Certificate with Host Mismatch
CVE-2026-9547 is a high-severity improper validation of certificate with host mismatch vulnerability in curl, with a CVSS 3.1 base score of 7.4 out of 10. It can be exploited remotely over the network by an unauthenticated attacker, without any action from a user. The record lists versions 8.14.2, 8.16.1, 8.20.1 as the first without the flaw, so updating curl to one of those releases or later removes the exposure. There is no confirmed exploitation so far. EPSS estimates a 0.36% chance of exploitation within 30 days, which is low compared with other CVEs.
High severity with no evidence of exploitation so far.
What to do
- Update curl to 8.14.2 or 8.16.1 or 8.20.1 or 0b8dbbc63c98777e4584cb9fbd71df3464008ad1, whichever matches your release line, or a later version.
- Read the advisory on curl.se for workarounds and exact fixed builds.
- Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Curl | curl | 7.69.0 up to, but not including, 8.14.2; 8.15.0 up to, but not including, 8.16.1; 8.17.0 up to, but not including, 8.20.1; 507cf6a13db0375eadd4655b4c64710db29e9cf2 up to, but not including, 0b8dbbc63c98777e4584cb9fbd71df3464008ad1; 8.20.0; 8.19.0; 8.18.0; 8.17.0; and 32 more ranges | 8.14.2, 8.16.1, 8.20.1, 0b8dbbc63c98777e4584cb9fbd71df3464008ad1 |
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- NetworkCan be exploited remotely over a network, including the internet.
- Attack complexity
- HighSuccess depends on conditions outside the attacker's control.
- Privileges required
- NoneNo account or login is needed.
- User interaction
- NoneNo action by a victim is required.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- HighData or code can be modified at will.
- Availability
- NoneAvailability is not affected.
Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N. Scored by CISA (ADP).
Official description
When a libcurl-based application performs transfers via `SCP://` or `SFTP://` and utilizes the `CURLOPT_SSH_KEYFUNCTION` callback, it may silently accept an untrusted server. This vulnerability occurs when a server presents a host key type that does not match the specific key type already recorded for that host in the `known_hosts` file. Instead of rejecting the mismatch, the callback mechanism fails to properly enforce the restriction, allowing the connection to succeed without warning and risking a potential man-in-the-middle attack.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Improper Validation of Certificate with Host Mismatch
The product communicates with a host that provides a certificate, but the product does not properly ensure that the certificate is actually associated with that host.
How developers prevent this class of flaw
- In order to ensure data integrity, the certificate must be valid, and it must pertain to the site that is being accessed.Fully check the hostname of the certificate and provide the user with adequate information about the nature of the problem and how to proceed.
- If certificate pinning is being used, ensure that all relevant properties of the certificate are fully validated before the certificate is pinned, including the hostname.
- Be careful of other weaknesses in the code that checks the hostname, since it is still possible to incorrectly check the hostname. For example, attackers could create a certificate with a name that begins with a trusted name followed by a NUL byte, which could cause some string-based comparisons to only examine the portion that contains the trusted name.
More Improper Validation of Certificate with Host Mismatch vulnerabilities (CWE-297)
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: poc, automatable: no, technical impact: total).
- Record last changed materially (score, affected products, status or references).
References
Technical write-ups (may include proof of concept)
- hackerone.com/reports/3751712Exploit, Issue Tracking, Third Party Advisory
Other vulnerabilities in curl
- 7.5 High severity
- 9.1 Critical severity
- 7.5 High severity
- 7.5 High severity
- 8.1 High severity
- 9.1 Critical severity
Recent Improper Validation of Certificate with Host Mismatch vulnerabilities
- 7.5 High severity
- 7.4 High severity
- 8.5 High severity
- 7.3 High severity
- 8.1 High severity
- 7.4 High severity
Spotted an error? Tell us.