CVE-2026-58471

GNU Wget 1.25.0 Heap Buffer Overflow via convert_fname() in url.c

Published Jul 7, 2026 CVSS 4.0 · 6 Medium EPSS < 1% KEV · Not listed
Description
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.

Analysis

AI-generated

Technical impact

GNU Wget versions up to 1.25.0 contain a heap buffer overflow in the convert_fname() function within src/url.c. When the iconv conversion reports an E2BIG error and a buffer reallocation is attempted, the computation of the remaining space is incorrect, allowing a maliciously crafted server‑supplied filename to overflow the output buffer. This is a CWE‑122 heap buffer overflow and results in memory corruption on the client side.

Affected Systems

All installations of GNU Wget that have not applied commit c2640fe, including the widely distributed 1.25.0 release, are vulnerable. The issue affects any client execution that processes URLs whose filenames require character set conversion.

Risk and Exploitability

The CVSS score of 6 indicates moderate severity. An EPSS score of less than 1% suggests a very low likelihood of exploitation at present. The vulnerability is not listed in the CISA KEV catalog. Attackers must control a server that supplies a specially crafted filename to trigger the overflow, constituting a remote attack vector. Successful exploitation would lead to memory corruption on the client machine.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update GNU Wget to a patched release that includes commit c2640fe or later.
  • If compiling from source, apply the patch manually by checking out commit c2640fe and rebuilding.
  • If upgrade is not immediately possible, temporarily replace Wget with an alternative such as curl until a patched version is available.

Generated by OpenCVE AI on August 4, 2026 at 18:49 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Ubuntu USN Ubuntu USN USN-8543-1 Wget vulnerabilities
History
Type Values Removed Values Added
First Time appeared Gnu
Gnu wget
CPEs cpe:2.3:a:gnu:wget:*:*:*:*:*:*:*:*
Vendors & Products Gnu
Gnu wget
Type Values Removed Values Added
First Time appeared Wget
Wget wget
Vendors & Products Wget
Wget wget
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description 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.
Title GNU Wget 1.25.0 Heap Buffer Overflow via convert_fname() in url.c
Weaknesses CWE-122
References
Metrics cvssV3_1

{'score': 5.9, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:H'}

cvssV4_0

{'score': 6, 'vector': 'CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:P/VC:N/VI:L/VA:H/SC:N/SI:N/SA:N'}

Weaknesses
  • CWE-122

    Heap-based Buffer Overflow

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Jul 14, 2026, 10:03 PM
Reserved
Jun 30, 2026, 8:20 PM
Status
Analyzed
Published
Jul 7, 2026, 9:17 PM
Modified
Oct 25, 2026, 8:10 PM
Severity
Moderate
Public date
Jul 7, 2026, 7:47 PM