Hi, The following vulnerabilities were published for wget. CVE-2026-58469[0]: | GNU Wget through 1.25.0, fixed in commit 37a40fc, contains a heap | buffer underread vulnerability in the clean_metalink_string() | function within src/metalink.c that allows a malicious server to | trigger memory corruption by serving a Metalink document containing | a whitespace-only URL. Attackers can cause the function to decrement | a pointer past the start of the buffer when processing an all- | whitespace Metalink URL, potentially leading to abnormal program | behavior. CVE-2026-58470[1]: | GNU Wget through 1.25.0, fixed in commit 43d3ba9, contains an | integer overflow vulnerability in the parse_content_range() function | within src/http.c that allows server-controlled values to cause | signed integer arithmetic to overflow. Attackers can supply | malicious Content-Range header values to trigger undefined behavior | and download desynchronization in the affected client. CVE-2026-58471[2]: | GNU Wget through 1.25.0, fixed in commit c2640fe, contains a heap | buffer overflow vulnerability in the convert_fname() function within | src/url.c that allows remote attackers to trigger memory corruption | through a server-supplied filename requiring character set | conversion. When the output buffer is too small during iconv E2BIG | reallocation, the reallocation logic miscalculates the remaining | space, leading to a heap buffer overflow that can be exploited via a | maliciously crafted server response. CVE-2026-58472[3]: | GNU Wget through 1.25.0, fixed in commit dd692d9, contains a heap | buffer overflow vulnerability in the html_quote_string() function in | src/convert.c that allows a remote attacker to trigger memory | corruption by supplying a crafted HTML attribute with a large number | of characters requiring entity encoding. A server-supplied HTML | attribute causes a signed integer counter to overflow during output | size accumulation, resulting in an undersized heap allocation and | subsequent heap buffer overflow during the copy phase. If you fix the vulnerabilities please also make sure to include the CVE (Common Vulnerabilities & Exposures) ids in your changelog entry. For further information see: [0] https://security-tracker.debian.org/tracker/CVE-2026-58469 https://www.cve.org/CVERecord?id=CVE-2026-58469 [1] https://security-tracker.debian.org/tracker/CVE-2026-58470 https://www.cve.org/CVERecord?id=CVE-2026-58470 [2] https://security-tracker.debian.org/tracker/CVE-2026-58471 https://www.cve.org/CVERecord?id=CVE-2026-58471 [3] https://security-tracker.debian.org/tracker/CVE-2026-58472 https://www.cve.org/CVERecord?id=CVE-2026-58472 Please adjust the affected versions in the BTS as needed. Regards, Salvatore
Hi,
Attached is a debdiff against wget 1.25.0-3 (as an NMU-style 1.25.0-3.1)
that fixes CVE-2026-58470, CVE-2026-58471 and CVE-2026-58472 by backporting
the upstream commits. Some notes that may save time:
1. CVE-2026-58472: the commit referenced in the CVE (dd692d9c) is not
sufficient on its own. It introduced a new heap buffer overflow in
html_quote_string(): the per-character size counts lost the "+1" that the
old loop header provided, so the allocation is too small for any string
containing &, <, >, " or a space. Upstream fixed this in f76978a5
("Regression: Fix buffer overflow in html_quote_string()"), which also adds
unit tests. With dd692d9c alone, the new test_html_quote_string unit test
aborts under ASan:
AddressSanitizer: heap-buffer-overflow src/convert.c:1253 in
html_quote_string
The attached patch includes both commits.
2. CVE-2026-58470: includes the upstream follow-ups 01ff771c (strtol ->
strtoll) and a6d20d8f (regression test in test_parse_range_header).
3. CVE-2026-58471: upstream c2640fe5, applies as-is.
4. CVE-2026-58469: I believe Debian is not affected. The bug is in
src/metalink.c, and Debian builds wget without metalink support (no
libmetalink-dev in Build-Depends; "wget --version" shows -metalink), so the
code is not compiled. If you agree, the tracker could mark it
<not-affected> (built without metalink support). Note for anyone who
enables metalink later: 37a40fcb itself has an inverted trailing-whitespace
check, fixed upstream in 7b1cdecc, and needs 82d945ff (#include <ctype.h>).
Testing (sid chroot, amd64):
- dpkg-buildpackage: full build passes; the test suite reports 0 FAIL / 0
ERROR across all groups, and unit-tests passes (including the new range and
html_quote_string tests).
- ASan/UBSan builds of unpatched 1.25.0-3 vs patched, against a local HTTP
server:
* CVE-2026-58470: 206 response with "Content-Range: bytes
0-9/99999999999999999999". Unpatched: "runtime error: signed integer
overflow". Patched: header rejected, no error.
* CVE-2026-58471: wget --remote-encoding=ISO-8859-1
--local-encoding=UTF-32LE
https://www.google.com/url?q=http://127.0.0.1/&source=gmail&ust=1793490607448000&sa=E<40
x 'A'>. Unpatched: "AddressSanitizer: heap-buffer-overflow" in
convert_fname. Patched: clean.
* CVE-2026-58472: patched build passes all 21 unit tests under ASan. The
dd692d9c-only build overflows as described above.
- lintian shows no new tags (the custom-library-search-path RUNPATH error
already exists in 1.25.0-3).
Thanks for maintaining wget.
Regards