cbcvebase.
CVE-2016-4971
published 2016-06-30

CVE-2016-4971: GNU wget before 1.18 allows remote servers to write to arbitrary files by redirecting a request from HTTP to a crafted FTP resource.

PriorityP271high8.8CVSS 3.1
AVNACLPRNUIRSUCHIHAH
EXPLOIT
EPSS
45.93%
98.7th percentile
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

16 ranges
VendorProductVersion rangeFixed in
canonicalubuntu_linux
canonicalubuntu_linux
canonicalubuntu_linux
canonicalubuntu_linux
debianwget< wget 1.18-1 (bookworm)wget 1.18-1 (bookworm)
gnuwget< 1.181.18
gnuwget>= 0 < 1.18-11.18-1
gnuwget>= 0 < 1.18-11.18-1
gnuwget>= 0 < 1.18-11.18-1
gnuwget>= 0 < 1.18-11.18-1
oraclesolaris
oraclesolaris
paloaltopan-os
paloaltonetworkspan-os6.1.0 – 6.1.16
paloaltonetworkspan-os7.0.0 – 7.0.14
paloaltonetworkspan-os7.1.0 – 7.1.9

Detection & IOCsextracted from sources · hover to see the quote

filename.bash_profile
filename.wgetrc
path/etc/cron.d/wget-root-shell
path/root/hacked-via-wget
path/etc/shadow
port2121
commandftp://anonymous@{}:{}/{}
  • Detect wget HTTP responses with a 301 redirect to an FTP URI using anonymous authentication, which is the core exploit primitive for CVE-2016-4971.
  • Monitor for creation or modification of .wgetrc or .bash_profile in user home directories following a wget invocation, as these are the primary payload drop targets.
  • Alert on wget processes that receive an HTTP 301 redirect to an ftp:// scheme URI, especially with anonymous credentials, as this is the exploit trigger.
  • Detect unexpected files written to /etc/cron.d/ by wget processes, which indicates privilege escalation via the .wgetrc output_document setting.
  • Check for wget User-Agent in HTTP requests followed by an FTP redirect response; the exploit specifically checks for 'Wget' in the User-Agent before issuing the malicious redirect.
  • Monitor for wget POST requests containing /etc/shadow content, which indicates the post_file exfiltration stage of the exploit chain.
  • The exploit does not work when wget is invoked with -O /tmp/output; detection should focus on wget invocations without explicit output path flags, especially those run from home directories or web roots.
  • ·Exploitation requires the attacker to control or intercept the HTTP server responding to the wget request; it is also exploitable by network-positioned attackers who can inject malicious 301 redirect responses into unencrypted HTTP traffic.
  • ·On PAN-OS, exploitation additionally requires the attacker to be authenticated on the Management Interface, limiting the attack surface compared to general wget usage.
  • ·The attacker can only write files to the current working directory of the wget process or a directory specified by -P; however, running wget from a home directory or web document root significantly widens impact.
  • ·The exploit is also effective with wget mirroring/recursive options (-r or -m), which should be treated as additional high-risk invocation patterns.

CVSS provenance

nvdv3.18.8HIGHCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
nvdv2.04.3MEDIUMAV:N/AC:M/Au:N/C:N/I:P/A:N
osv8.8HIGH
vendor_debian8.8HIGH
vendor_redhat8.8HIGH
CVEs like this are exactly what “Exploited This Week” covers.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.