CVE-2014-4877
NoneCVSS
—
EPSS
39.9%
Published
Oct 29, 2014
CISA due date
—
Cloudanix analysis
An old flaw in a common file-download tool lets attackers who control an FTP server write files anywhere on a victim's computer when automatic downloading is turned on, potentially taking over the machine.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Moderate
- Impact
- Remote Code Execution
- Component
- Application
- Class
- Path Traversal
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Absolute path traversal via crafted FTP LIST responses containing duplicate filenames where one is marked as a symlink, allowing writes to arbitrary filesystem locations when recursive download is enabled.
Why it matters to the business
Attackers can place and execute malicious code on systems that automatically mirror content from untrusted FTP servers, leading to full host compromise and potential supply-chain poisoning of downloaded artifacts.
How an attack unfolds
A malicious FTP server returns a LIST response with two entries for the same filename; one entry declares the file as a symlink pointing outside the download tree. Wget follows the symlink during recursion and writes attacker-controlled content to arbitrary paths, resulting in code execution.
How to fix it
Upgrade GNU Wget to version 1.16 or later. Disable recursive downloads from untrusted sources until patched. Consider replacing wget with curl or aria2 where recursion from FTP is not required.
How to confirm the fix worked
Run 'wget --version' and confirm 1.16 or newer; test recursive FTP fetches against a controlled server that emits symlink entries and verify writes remain confined to the destination directory.
Typical attack path
- Attacker sets up malicious FTP server
- Victim runs wget with recursive mode against the server
- Server returns specially crafted LIST response
- Wget follows symlink and writes payload to arbitrary location
- Payload is executed via scheduled task, cron, or user invocation
How to detect it
Search process execution logs and command histories for wget invocations with -r or --recursive flags against external FTP hosts; examine downloaded directory trees for unexpected symlinks or files written outside the intended destination.
What your security team should do
- Immediately inventory all systems using wget < 1.16 and schedule upgrades
- Block or sandbox automated wget recursion jobs that contact external FTP servers
- Add wget version checks to configuration management and CI pipelines
The record
Absolute path traversal vulnerability in GNU Wget before 1.16, when recursion is enabled, allows remote FTP servers to write to arbitrary files, and consequently execute arbitrary code, via a LIST response that references the same filename within two entries, one of which indicates that the filename is for a symlink.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:11 | wget | 0 | 1.16-1 |
| Debian:12 | wget | 0 | 1.16-1 |
| Debian:13 | wget | 0 | 1.16-1 |
| Debian:6.0 | wget | 0 | 1.12-2.1+deb6u1 |
| Debian:7 | wget | 0 | 1.13.4-3+deb7u2 |
| Mageia:3 | wget | 0 | 1.14-2.2.mga3 |
| Mageia:4 | wget | 0 | 1.14-4.2.mga4 |
| Red Hat:enterprise_linux:6::client | wget | 0 | 0:1.12-5.el6_6.1 |
| Red Hat:enterprise_linux:6::client | wget-debuginfo | 0 | 0:1.12-5.el6_6.1 |
| Red Hat:enterprise_linux:6::computenode | wget | 0 | 0:1.12-5.el6_6.1 |
| Red Hat:enterprise_linux:6::computenode | wget-debuginfo | 0 | 0:1.12-5.el6_6.1 |
| Red Hat:enterprise_linux:6::server | wget | 0 | 0:1.12-5.el6_6.1 |
| Red Hat:enterprise_linux:6::server | wget-debuginfo | 0 | 0:1.12-5.el6_6.1 |
| Red Hat:enterprise_linux:6::workstation | wget | 0 | 0:1.12-5.el6_6.1 |
| Red Hat:enterprise_linux:6::workstation | wget-debuginfo | 0 | 0:1.12-5.el6_6.1 |
| Red Hat:enterprise_linux:7::client | wget | 0 | 0:1.14-10.el7_0.1 |
| Red Hat:enterprise_linux:7::client | wget-debuginfo | 0 | 0:1.14-10.el7_0.1 |
| Red Hat:enterprise_linux:7::computenode | wget | 0 | 0:1.14-10.el7_0.1 |
| Red Hat:enterprise_linux:7::computenode | wget-debuginfo | 0 | 0:1.14-10.el7_0.1 |
| Red Hat:enterprise_linux:7::server | wget | 0 | 0:1.14-10.el7_0.1 |
| Red Hat:enterprise_linux:7::server | wget-debuginfo | 0 | 0:1.14-10.el7_0.1 |
| Red Hat:enterprise_linux:7::workstation | wget | 0 | 0:1.14-10.el7_0.1 |
| Red Hat:enterprise_linux:7::workstation | wget-debuginfo | 0 | 0:1.14-10.el7_0.1 |
| Red Hat:rhel_eus:6.5::computenode | wget | 0 | 0:1.12-1.12.el6_5 |
| Red Hat:rhel_eus:6.5::computenode | wget-debuginfo | 0 | 0:1.12-1.12.el6_5 |
| Red Hat:rhel_eus:6.5::server | wget | 0 | 0:1.12-1.12.el6_5 |
| Red Hat:rhel_eus:6.5::server | wget-debuginfo | 0 | 0:1.12-1.12.el6_5 |
| Ubuntu:14.04:LTS | wget | 0 | 1.15-1ubuntu1.14.04.1 |
| openSUSE:Tumbleweed | wget | 0 | 1.18-2.3 |
Related vulnerabilities
- 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-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-2016-7098 Race condition in wget 1.17 and earlier, when used in recursive or mirroring mode to… Also affects wget
- CVE-2016-4971 GNU wget before 1.18 allows remote servers to write to arbitrary files by redirecting a… 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-2026-81163 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')… CWE-22