CVE-2024-6874 macidn punycode buffer overread
An attacker can trigger a buffer overread in libcurl's macidn backend, potentially leaking stack contents when processing specific IDN names.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-6874?
CVE-2024-6874 is a low-severity vulnerability in Haxx Libcurl, published on 24 Jul 2024. Any signed-in user can exploit it over the network, with no action from the victim.
Official description
libcurl's URL API function [curl_url_get()](https://curl.se/libcurl/c/curl_url_get.html) offers punycode conversions, to and from IDN. Asking to convert a name that is exactly 256 bytes, libcurl ends up reading outside of a stack based buffer when built to use the *macidn* IDN backend. The conversion function then fills up the provided buffer exactly - but does not null terminate the string.
This flaw can lead to stack contents accidently getting returned as part of the converted string.
Weakness: CWE-125
Which versions are affected by CVE-2024-6874?
It affects 1 product.
Products include Haxx Libcurl.
How do I fix CVE-2024-6874?
Upgrade to a fixed version.
Is CVE-2024-6874 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-6874 exists.
Other vulnerabilities in Haxx Libcurl
Sources
Also known as ALPINE-CVE-2024-6874, AZL-47020, AZL-47046, AZL-49664, BELL-CVE-2024-6874, CLEANSTART-2026-AW71894 and 4 more.