CVE-2024-24806
npm vulnerability analysis and mitigation

Overview

CVE-2024-24806 is a vulnerability discovered in libuv, a multi-platform support library focused on asynchronous I/O. The vulnerability affects versions from 1.24.0 up to versions prior to 1.48.0, which was released in February 2024. The issue lies in how the hostname_ascii variable (with a length of 256 bytes) is handled in uv_getaddrinfo and its subsequent processing (GitHub Advisory).

Technical details

The vulnerability occurs in the uv_getaddrinfo function in src/unix/getaddrinfo.c and its Windows counterpart src/win/getaddrinfo.c. When hostnames exceed 256 characters, they get truncated without a proper terminating null byte. This truncation behavior can be exploited to create addresses like 0x00007f000001, which getaddrinfo considers valid, potentially allowing attackers to craft payloads that resolve to unintended IP addresses (GitHub Advisory).

Impact

The vulnerability can lead to Server-Side Request Forgery (SSRF) attacks, allowing unauthorized access to internal APIs, particularly in environments with multiple pods (e.g., Kubernetes). Additionally, websites that allow users to have custom subdomains could be exposed to SSRF attacks if a malicious user chooses a long vulnerable username. The vulnerability has been rated as High severity with a CVSS score of 7.3 (NetApp Security).

Mitigation and workarounds

The vulnerability has been fixed in libuv version 1.48.0. The fix includes proper zero-termination of IDNA output and rejection of zero-length IDNA inputs. Organizations using affected versions should upgrade to version 1.48.0 or later. Various vendors have also released patches for their products, including Red Hat Enterprise Linux and Debian (Red Hat Advisory, Debian LTS).

Additional resources


SourceThis report was generated using AI

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management