# CVE-2024-24806: Improper Domain Lookup that potentially leads to SSRF attacks in libuv

> Attackers can exploit hostname truncation in libuv to bypass security checks and perform Server-Side Request Forgery attacks against internal services.

- **Severity:** High 7.3 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 7 Feb 2024
- **Updated:** 17 Jun 2025
- **Also known as:** ALPINE-CVE-2024-24806, ALSA-2024:4247, ALSA-2024:4756, AZL-34278, AZL-34306, AZL-34957, AZL-35051, AZL-35133, AZL-35782, BELL-CVE-2024-24806, CLSA-2025-1762363908, DEBIAN-CVE-2024-24806, DLA-3752-1, DSA-5638-1, ECHO-797c-51ce-00bf, GHSA-f74f-cvh7-c6q6, MGASA-2024-0079, OESA-2024-1200, RHSA-2024:4247, RHSA-2024:4756, RHSA-2024:8132, RLSA-2024:4247, RLSA-2024:4756, ROOT-OS-ALPINE-318-CVE-2024-24806, ROOT-OS-ALPINE-319-CVE-2024-24806, SUSE-SU-2024:4109-1, UBUNTU-CVE-2024-24806, USN-6666-1, openSUSE-SU-2024:13818-1

## What is CVE-2024-24806?

CVE-2024-24806 is a high-severity server-side request forgery vulnerability in libuv, published on 7 Feb 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

libuv is a multi-platform support library with a focus on asynchronous I/O. The `uv_getaddrinfo` 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 `hostname_ascii` variable (with a length of 256 bytes) is handled in `uv_getaddrinfo` and subsequently in `uv__idna_toascii`. 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.

Weakness: CWE-918 (Server-Side Request Forgery)

## Which versions are affected by CVE-2024-24806?

It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `libuv` | AlmaLinux:8 | All versions | 1:1.41.1-2.el8_10 |
| `libuv-devel` | AlmaLinux:8 | All versions | 1:1.41.1-2.el8_10 |
| `libuv` | AlmaLinux:9 | All versions | 1:1.42.0-2.el9_4 |
| `libuv-devel` | AlmaLinux:9 | All versions | 1:1.42.0-2.el9_4 |
| `libuv` | Red Hat:enterprise_linux:8::appstream | All versions | 1:1.41.1-2.el8_10 |
| `libuv-debuginfo` | Red Hat:enterprise_linux:8::appstream | All versions | 1:1.41.1-2.el8_10 |
| `libuv-debugsource` | Red Hat:enterprise_linux:8::appstream | All versions | 1:1.41.1-2.el8_10 |
| `libuv-debuginfo` | Red Hat:enterprise_linux:8::crb | All versions | 1:1.41.1-2.el8_10 |
| `libuv-debugsource` | Red Hat:enterprise_linux:8::crb | All versions | 1:1.41.1-2.el8_10 |
| `libuv-devel` | Red Hat:enterprise_linux:8::crb | All versions | 1:1.41.1-2.el8_10 |
| `libuv` | Red Hat:enterprise_linux:9::appstream | All versions | 1:1.42.0-2.el9_4 |
| `libuv-debuginfo` | Red Hat:enterprise_linux:9::appstream | All versions | 1:1.42.0-2.el9_4 |
| `libuv-debugsource` | Red Hat:enterprise_linux:9::appstream | All versions | 1:1.42.0-2.el9_4 |
| `libuv-debuginfo` | Red Hat:enterprise_linux:9::crb | All versions | 1:1.42.0-2.el9_4 |
| `libuv-debugsource` | Red Hat:enterprise_linux:9::crb | All versions | 1:1.42.0-2.el9_4 |
| `libuv-devel` | Red Hat:enterprise_linux:9::crb | All versions | 1:1.42.0-2.el9_4 |
| `libuv` | Red Hat:rhel_eus:8.8::appstream | All versions | 1:1.41.1-1.el8_8.1 |
| `libuv-debuginfo` | Red Hat:rhel_eus:8.8::appstream | All versions | 1:1.41.1-1.el8_8.1 |
| `libuv-debugsource` | Red Hat:rhel_eus:8.8::appstream | All versions | 1:1.41.1-1.el8_8.1 |
| `libuv-debuginfo` | Red Hat:rhel_eus:8.8::crb | All versions | 1:1.41.1-1.el8_8.1 |
| `libuv-debugsource` | Red Hat:rhel_eus:8.8::crb | All versions | 1:1.41.1-1.el8_8.1 |
| `libuv-devel` | Red Hat:rhel_eus:8.8::crb | All versions | 1:1.41.1-1.el8_8.1 |
| `libuv` | Rocky Linux:8 | All versions | 1:1.41.1-2.el8_10 |
| `libuv` | Rocky Linux:9 | All versions | 1:1.42.0-2.el9_4 |
| `libuv` | SUSE:Linux Enterprise Micro 5.5 | All versions | 1.44.2-150500.3.5.1 |
| `libuv` | SUSE:Linux Enterprise Module for Basesystem 15 SP5 | All versions | 1.44.2-150500.3.5.1 |
| `libuv` | SUSE:Linux Enterprise Module for Basesystem 15 SP6 | All versions | 1.44.2-150500.3.5.1 |
| `libuv` | openSUSE:Leap 15.5 | All versions | 1.44.2-150500.3.5.1 |
| `libuv` | openSUSE:Leap 15.6 | All versions | 1.44.2-150500.3.5.1 |
| `libuv` | openSUSE:Tumbleweed | All versions | 1.48.0-1.1 |

Products: Libuv Libuv.

## How do I fix CVE-2024-24806?

Upgrade to a fixed version.

## Is CVE-2024-24806 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-24806 exists.

## Other vulnerabilities in libuv

- [CVE-2014-9748](https://insights.sbomify.com/CVE-2014-9748/): Race condition in n/a (high 8.1)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-24806 and fix it if it is affected.

What it is: CVE-2024-24806 is a high-severity server-side request forgery vulnerability in libuv, published on 7 Feb 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-24806 exists.

Affected product: libuv. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2024-24806/ (Markdown: https://insights.sbomify.com/CVE-2024-24806/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2024-24806
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2024-24806
- OSV: https://osv.dev/vulnerability/CVE-2024-24806

---
From sbomify Insights: https://insights.sbomify.com/CVE-2024-24806/
Summaries are generated and may contain mistakes; the official description above is the record.
