CVE-2024-24806

7.3 HIGH

📋 TL;DR

A buffer truncation vulnerability in libuv's uv_getaddrinfo function allows attackers to craft malicious hostnames that resolve to unintended IP addresses. This can bypass developer checks and potentially enable SSRF attacks against internal services. Applications using vulnerable libuv versions for DNS resolution are affected.

💻 Affected Systems

Products:
  • libuv
Versions: All versions before 1.48.0
Operating Systems: Linux, Windows, macOS, Other Unix-like systems
Default Config Vulnerable: ⚠️ Yes
Notes: Any application using libuv's uv_getaddrinfo function with user-controlled hostnames is vulnerable.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers could bypass security controls to access internal APIs, perform SSRF attacks against internal infrastructure, or redirect traffic to malicious endpoints.

🟠

Likely Case

SSRF attacks against internal services that process user-controlled hostnames, particularly in multi-tenant environments where users can create subdomains.

🟢

If Mitigated

Limited impact if proper network segmentation, egress filtering, and input validation are already implemented.

🌐 Internet-Facing: MEDIUM - Exploitable if applications process user-supplied hostnames, but requires specific conditions.
🏢 Internal Only: MEDIUM - Internal services that crawl or cache user-generated content could be vulnerable to SSRF.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ⚠️ Yes
Complexity: MEDIUM

Exploitation requires the ability to control hostnames passed to uv_getaddrinfo and specific application logic that processes the results.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 1.48.0

Vendor Advisory: https://github.com/libuv/libuv/security/advisories

Restart Required: Yes

Instructions:

1. Identify libuv version in use
2. Upgrade to libuv version 1.48.0 or later
3. Rebuild applications linked against libuv
4. Restart affected services

🔧 Temporary Workarounds

Input validation

all

Validate and limit hostname length before passing to uv_getaddrinfo

🧯 If You Can't Patch

  • Implement strict input validation to reject hostnames longer than 255 characters
  • Deploy network controls to restrict outbound connections from vulnerable services

🔍 How to Verify

Check if Vulnerable:

Check libuv version: ldd --version or check package manager output

Check Version:

ldd --version | grep libuv || uv --version || check system package manager

Verify Fix Applied:

Verify libuv version is 1.48.0 or higher

📡 Detection & Monitoring

Log Indicators:

  • Unusual DNS resolution patterns
  • Attempts to resolve hostnames with exactly 256 characters
  • Failed DNS lookups with truncated hostnames

Network Indicators:

  • Outbound connections to unexpected IP ranges from services using libuv
  • DNS queries with unusually long hostnames

SIEM Query:

source="dns.log" AND query_length>=256

🔗 References

📤 Share & Export