Cookie Injection Vulnerability in Wget - CVE-2018-0494
Summary
ALPINE-CVE-2018-0494: GNU Wget before 1.19.5 is prone to a cookie injection vulnerability in the resp_new function in http.c via a \r\n sequence in a continuation line. Affects wget versions < 1.19.5-r0. Fixed in 1.19.5-r0. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
Wget is a widely used command-line utility for downloading files from the web. It supports HTTP, HTTPS, and FTP protocols, allowing users to retrieve content from the internet easily. Wget is known for its robustness and ability to handle complex downloads, including recursive downloads and mirroring of websites. However, a vulnerability identified as CVE-2018-0494 has been discovered in Wget versions prior to 1.19.5, which exposes users to potential cookie injection attacks.
Vulnerability Detail
The vulnerability arises from a flaw in the resp_new function within the http.c file of Wget. Specifically, it allows an attacker to inject cookies by exploiting a \r\n sequence in a continuation line. This could lead to unauthorized access or manipulation of user sessions, as the injected cookies may be accepted by the application. The severity of this vulnerability is reflected in its CVSS score of 6.5, indicating a moderate risk to users who have not updated to the patched version.
How To Fix
Minimum fixed version
1.19.5-r0
This is the first release that contains the fix.
sudo apk add --upgrade wget
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
If updating is not immediately possible, consider using a different tool for downloading files or limiting the use of Wget in environments where sensitive data is handled until the update can be applied.
Conclusion
CVE-2018-0494 is a significant vulnerability in Wget that can lead to cookie injection attacks. Users are strongly advised to update to the patched version to mitigate risks. Monitoring tools like Vulert can assist in identifying vulnerabilities in your applications.
See every vulnerability recorded for wget →
FAQ
CVE-2018-0494 is a vulnerability in Wget that allows for cookie injection through a specific sequence in HTTP responses.
You can check your version of Wget by running 'wget --version' in your command line. If it is below 1.19.5, it is vulnerable.
The vulnerability could allow attackers to inject malicious cookies, potentially leading to unauthorized access or session hijacking.
Yes, you can use Vulert, which monitors open-source vulnerabilities in your software using a manifest file like package-lock.json. Visit https://vulert.com for more information.
Consider using alternative tools for downloading files or limit the use of Wget in sensitive environments until you can apply the update.
References
Related vulnerabilities
Recent vulnerabilities recorded for wget.