Cookie Injection Vulnerability in Wget - CVE-2018-0494

wget Updated 02 Oct 2025

Summary

06/05/2018
N/A
Yes i
Medium
6.5

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 ↓

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

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 →

Share this vulnerability

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.

Related vulnerabilities

Recent vulnerabilities recorded for wget.

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 →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback