Executive brief
GNU Wget, a widely used command-line tool for downloading files from the internet, contains a security flaw in how it handles file names provided by remote servers. If a user connects to a malicious server, the server can send a specially crafted file name that causes the application to crash or potentially allow unauthorized memory access. This could disrupt automated download processes or lead to further system compromise if the tool is used in sensitive environments.
Technical details
A heap-based buffer overflow exists in GNU Wget through version 1.25.0 within the `convert_fname()` function in `src/url.c`. The vulnerability is triggered during character set conversion using `iconv` when the output buffer is insufficient (returning `E2BIG`). The reallocation logic miscalculates the remaining buffer space, leading to a heap overflow when subsequent conversion data is written. An attacker can exploit this by hosting a malicious server that returns a crafted filename requiring complex character conversion, potentially leading to memory corruption or arbitrary code execution. The issue was addressed in Git commit c2640fe.
Affected products
- GNU Wget through 1.25.0
Timeline
- 2026-01-13: other: Vulnerability fix authored
- 2026-06-29: patched: Fix committed to main repository
- 2026-07-07: disclosed: Public disclosure and CVE assignment