CVE-2024-24806: Improper Domain Lookup that potentially leads to SSRF attacks in libuv
libuv is a multi-platform support library with a focus on asynchronous I/O. The uvgetaddrinfo function in src/unix/getaddrinfo.c (and its windows counterpart src/win/getaddrinfo.c), truncates hostnames to 256 characters before calling getaddrinfo. This behavior can be exploited to create addresses like 0x00007f000001, which are considered valid by getaddrinfo and could allow an attacker to craft payloads that resolve to unintended IP addresses, bypassing developer checks. The vulnerability arises due to how the hostnameascii variable (with a length of 256 bytes) is handled in uvgetaddrinfo and subsequently in uvidnatoascii. When the hostname exceeds 256 characters, it gets truncated without a terminating null byte. As a result attackers may be able to access internal APIs or for websites (similar to MySpace) that allows users to have username.example.com pages. Internal services that crawl or cache these user pages can be exposed to SSRF attacks if a malicious user chooses a long vulnerable username. This issue has been addressed in release version 1.48.0. Users are advised to upgrade. There are no known workarounds for this vulnerability.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/libuv1to a version that resolves this vulnerability.Fixed in 1.24.1-1+deb10u2Fixed in 1.40.0-2+deb11u1Fixed in 1.44.2-1+deb12u1Fixed in 1.48.0-1Fixed in 1.48.0-1.1 - Upgrade
Upgrade
ubuntu/libuv1to a version that resolves this vulnerability.Fixed in 1.34.2-1ubuntu1.5 - Upgrade
Upgrade
ubuntu/libuv1to a version that resolves this vulnerability.Fixed in 1.43.0-1ubuntu0.1 - Upgrade
Upgrade
ubuntu/libuv1to a version that resolves this vulnerability.Fixed in 1.44.2-1ubuntu0.1 - Upgrade
Upgrade
redhat/libuvto a version that resolves this vulnerability.Fixed in 1.48.0 - Upgrade
Upgrade
libuvto a version that resolves this vulnerability.Fixed in 1.48.0Patch CVE-2024-24806
Event History
Frequently Asked Questions
What is the severity of CVE-2024-24806?
CVE-2024-24806 is classified as a medium severity vulnerability due to its potential for denial of service through hostname truncation.
How do I fix CVE-2024-24806?
To fix CVE-2024-24806, upgrade to libuv versions 1.24.1-1+deb10u2, 1.40.0-2+deb11u1, 1.44.2-1+deb12u1, or 1.48.0-1 or their specific updates depending on your distribution.
Which versions of libuv are affected by CVE-2024-24806?
Versions of libuv from 1.24.0 up to but not including 1.48.0 are affected by CVE-2024-24806.
Is CVE-2024-24806 specific to any operating system?
CVE-2024-24806 affects libuv across multiple operating systems including Linux distributions such as Debian and Ubuntu.
Can CVE-2024-24806 be exploited remotely?
Yes, CVE-2024-24806 can potentially be exploited remotely if an attacker can send specially crafted hostnames to an application using the vulnerable libuv library.