Skip to content
Crypto Disclosed report Intermediate CVE-2024-2466

CVE-2024-2466: TLS certificate check bypass with mbedTLS (reward request)

libcurl built with mbedTLS skipped the server certificate check when connecting to a host given as an IP address, because it did not set the hostname for verification. An attacker able to intercept traffic could present any certificate and have it accepted, though missing SNI often causes connection failures that reduce the impact.

frankyueh Follow

Originally disclosed on HackerOne

Bounty$2,580 Medium 5.3 View original
  • Triaged in 31 hours
  • Fixed in 2 days
  • Paid in 2 days
  • Disclosed after 2 days

Summary by the program

CVE-2024-2466 TLS certificate check bypass with mbedTLS

VULNERABILITY libcurl did not check the server certificate of TLS connections done to a host specified as an IP address, when built to use mbedTLS.

libcurl would wrongly avoid using the set hostname function when the specified hostname was given as an IP address, therefore completely skipping the certificate check. This affects all uses of TLS protocols (HTTPS, FTPS, IMAPS, POPS3, SMTPS, etc).

INFO Since the SNI field is not set when using a hostname set as an IP address, many requests will fail to communicate with the correct endpoint or get the correct data. Somewhat lessening the possible impact.

Not all versions of mbedTLS supports server certificate checks for IP addresses, so when this issue is fixed all attempts to connect directly to an IP address over TLS might fail.

This vulnerability is similar to a past curl vulnerability identified as CVE-2016-3739.

This flaw also affects the curl command line tool.

The Common Vulnerabilities and Exposures (CVE) project has assigned the name CVE-2024-2466 to this issue.

CWE-297: Improper Validation of Certificate with Host Mismatch

Severity: Medium

CREDITS Reported-by: Frank Yueh Patched-by: Stefan Eissing

Full Security Advisory: https://curl.se/docs/CVE-2024-2466.html

The report

For reward request.

Please refer to this report issue from curl: https://hackerone.com/reports/2416725

And already published at here: https://curl.se/docs/CVE-2024-2466.html

Impact

Reference from above.

The original report as published on HackerOne, by frankyueh. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely libcurl avoided calling the hostname-setting function when the host was an IP address, so mbedTLS never performed certificate host verification.

Impact

An attacker who can intercept TLS traffic could impersonate the server without a valid certificate, but the missing SNI field often causes connections to fail, somewhat lessening the possible impact.

What the attacker needed

Libcurl built with mbedTLS; connection to a host given as an IP address; attacker can intercept TLS traffic

The fix

The text notes that once fixed, some connections directly to an IP address over TLS might fail because not all mbedTLS versions support certificate checks for IP addresses.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

When your browser or a program connects to a secure website, it checks a digital certificate to confirm it is talking to the real server. This report says that a particular library, libcurl, when built with a specific TLS backend called mbedTLS, skipped that check if you connected using a numeric IP address instead of a name. That means someone who can intercept the connection could pretend to be the server and the program would not notice.

What is Crypto?

Encryption, signatures, randomness or certificate checks that do not protect what they claim to.

More by frankyueh

View all

1 more disclosed report, best first.

More from Internet Bug Bounty

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cryptographic weaknesses

The lesson behind this report.

Encryption, signatures, randomness or certificate checks that do not protect what they claim to.