CVE-2016-4971
High · 8.8CVSS
8.8
EPSS
46.1%
Published
Jun 30, 2016
CISA due date
—
Cloudanix analysis
A flaw in an older file-download tool lets a malicious website trick the tool into saving files anywhere on the computer instead of only in the expected folder, which could let attackers damage or take over the system.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Data Tampering
- Component
- Application
- Class
- Path Traversal
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Remote server can force wget to write attacker-controlled content to arbitrary local filesystem paths via an HTTP-to-FTP redirect that bypasses path sanitization.
Why it matters to the business
Attackers can overwrite configuration files, scripts, or binaries on systems that fetch content with wget, leading to system compromise, data corruption, or persistent unauthorized access.
How an attack unfolds
An attacker hosts a malicious HTTP server that issues a 301/302 redirect to a specially crafted FTP URL containing path traversal sequences; when wget follows the redirect it writes the supplied content to any chosen local file instead of restricting writes to the current directory.
How to fix it
Upgrade GNU wget to version 1.18 or later (fixed in commit e996e322ffd42aaa051602da182d03178d0f13e1). For odoo (Bitnami) deployments, upgrade to 15.0.0 or newer. Where immediate upgrade is impossible, avoid using wget against untrusted URLs and prefer curl with --remote-name-off or other hardened clients.
How to confirm the fix worked
Confirm wget --version reports 1.18 or higher; re-test affected redirect scenarios in an isolated environment to verify path traversal is blocked; review package manifests or dependency locks for the listed fixed versions.
Typical attack path
- Attacker prepares HTTP server returning redirect to ftp://.../..%2F..%2Ftarget/path
- Victim or automated process invokes wget against the attacker-controlled HTTP URL
- wget follows redirect and performs FTP retrieval, writing received data to the traversed local path
- Attacker-supplied file overwrites or creates a file usable for code execution or persistence
How to detect it
Search command-line logs, process execution records, and wget history files for invocations containing ftp:// URLs with encoded traversal sequences or unexpected absolute paths; correlate with subsequent file-creation events outside the working directory.
- wget.*ftp://.*%2F%2E%2E%2F
- wget.*ftp://.*\.\./
- ftp://.*@.*:21/.*\.\.
What your security team should do
- Prioritize patching all wget instances to 1.18+ within the next maintenance window
- Inventory scripts and automation that invoke wget against external or user-supplied URLs
- Add wget version checks to CI/CD and container base-image scanning
- Monitor for unusual file writes in directories commonly targeted by path traversal
The record
GNU wget before 1.18 allows remote servers to write to arbitrary files by redirecting a request from HTTP to a crafted FTP resource.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Alpine:v3.4 | wget | 0 | 1.17.1-r1 |
| Debian:11 | wget | 0 | 1.18-1 |
| Debian:12 | wget | 0 | 1.18-1 |
| Debian:13 | wget | 0 | 1.18-1 |
| Debian:7 | wget | 0 | 1.13.4-3+deb7u3 |
| Mageia:5 | wget | 0 | 1.15-5.1.mga5 |
| Red Hat:enterprise_linux:7::client | wget | 0 | 0:1.14-13.el7 |
| Red Hat:enterprise_linux:7::client | wget-debuginfo | 0 | 0:1.14-13.el7 |
| Red Hat:enterprise_linux:7::computenode | wget | 0 | 0:1.14-13.el7 |
| Red Hat:enterprise_linux:7::computenode | wget-debuginfo | 0 | 0:1.14-13.el7 |
| Red Hat:enterprise_linux:7::server | wget | 0 | 0:1.14-13.el7 |
| Red Hat:enterprise_linux:7::server | wget-debuginfo | 0 | 0:1.14-13.el7 |
| Red Hat:enterprise_linux:7::workstation | wget | 0 | 0:1.14-13.el7 |
| Red Hat:enterprise_linux:7::workstation | wget-debuginfo | 0 | 0:1.14-13.el7 |
| SUSE:Linux Enterprise Desktop 12 SP1 | wget | 0 | 1.14-10.3 |
| SUSE:Linux Enterprise Point of Sale 11 SP3 | wget | 0 | 1.11.4-1.32.1 |
| SUSE:Linux Enterprise Server 11 SP3-LTSS | wget | 0 | 1.11.4-1.32.1 |
| SUSE:Linux Enterprise Server 11 SP3-LTSS | wget-openssl1 | 0 | 1.11.4-1.32.1 |
| SUSE:Linux Enterprise Server 11 SP3-TERADATA | wget | 0 | 1.11.4-1.32.1 |
| SUSE:Linux Enterprise Server 11 SP3-TERADATA | wget-openssl1 | 0 | 1.11.4-1.32.1 |
| SUSE:Linux Enterprise Server 11 SP4 | wget | 0 | 1.11.4-1.32.1 |
| SUSE:Linux Enterprise Server 11-SECURITY | wget-openssl1 | 0 | 1.11.4-1.32.1 |
| SUSE:Linux Enterprise Server 12 SP1 | wget | 0 | 1.14-10.3 |
| SUSE:Linux Enterprise Server for SAP Applications 11 SP4 | wget | 0 | 1.11.4-1.32.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP1 | wget | 0 | 1.14-10.3 |
| SUSE:Manager 2.1 | wget | 0 | 1.11.4-1.32.1 |
| SUSE:Manager Proxy 2.1 | wget | 0 | 1.11.4-1.32.1 |
| SUSE:OpenStack Cloud 5 | wget | 0 | 1.11.4-1.32.1 |
| Ubuntu:14.04:LTS | wget | 0 | 1.15-1ubuntu1.14.04.2 |
| Ubuntu:16.04:LTS | wget | 0 | 1.17.1-1ubuntu1.1 |
| openSUSE:Tumbleweed | wget | 0 | 1.18-2.3 |
Related vulnerabilities
- CVE-2017-13089 The http.c:skip_short_body() function is called in some circumstances, such as when… Also affects wget
- CVE-2017-13090 The retr.c:fd_read_body() function is called when processing OK responses. Also affects wget
- CVE-2024-10524 Applications that use Wget to access a remote resource using shorthand URLs and pass… Also affects wget
- CVE-2024-38428 url.c in GNU Wget through 1.24.5 mishandles semicolons in the userinfo subcomponent of a… Also affects wget
- CVE-2016-7098 Race condition in wget 1.17 and earlier, when used in recursive or mirroring mode to… Also affects wget
- CVE-2014-4877 Absolute path traversal vulnerability in GNU Wget before 1.16, when recursion is enabled… Also affects wget
- CVE-2004-1488 wget 1.8.x and 1.9.x does not filter or quote control characters when displaying HTTP… Also affects wget
- CVE-2015-2059 The stringprep_utf8_to_ucs4 function in libin before 1.31, as used in jabberd2, allows… Also affects wget