cve/2024/CVE-2024-24806.md

20 lines
1.8 KiB
Markdown
Raw Normal View History

2024-05-25 21:48:12 +02:00
### [CVE-2024-24806](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-24806)
![](https://img.shields.io/static/v1?label=Product&message=libuv&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=%3D%20%3E%3D%201.45.0%2C%20%3C%201.48.0%20&color=brighgreen)
![](https://img.shields.io/static/v1?label=Vulnerability&message=CWE-918%3A%20Server-Side%20Request%20Forgery%20(SSRF)&color=brighgreen)
### 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.
### POC
#### Reference
- http://www.openwall.com/lists/oss-security/2024/02/08/2
- https://github.com/libuv/libuv/security/advisories/GHSA-f74f-cvh7-c6q6
#### Github
2025-09-29 16:08:36 +00:00
- https://github.com/Roldo97/cve-patching
2024-05-25 21:48:12 +02:00
- https://github.com/fkie-cad/nvd-json-data-feeds