cbcvebase.
CVE-2018-0494
published 2018-05-06

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.

PriorityP353medium6.5CVSS 3.0
AVNACLPRNUIRSUCNIHAN
EXPLOIT
EPSS
17.04%
96.7th percentile
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.

Affected

18 ranges
VendorProductVersion rangeFixed in
canonicalubuntu_linux
canonicalubuntu_linux
canonicalubuntu_linux
canonicalubuntu_linux
canonicalubuntu_linux
debiandebian_linux
debiandebian_linux
debiandebian_linux
debianwget< wget 1.19.5-1 (bookworm)wget 1.19.5-1 (bookworm)
gnuwget< 1.19.51.19.5
gnuwget
gnuwget>= 0 < 1.19.5-11.19.5-1
gnuwget>= 0 < 1.19.5-11.19.5-1
gnuwget>= 0 < 1.19.5-11.19.5-1
gnuwget>= 0 < 1.19.5-11.19.5-1
redhatenterprise_linux_desktop
redhatenterprise_linux_server
redhatenterprise_linux_workstation

Detection & IOCsextracted from sources · hover to see the quote

cookiefoo="bar\r\n .google.com\tTRUE\t/\tFALSE\t1900000000\tinjected\tcookie\r\n\t"
commandwget --save-cookies jar.txt http://127.0.0.1:7777/plop
  • Detect malicious Set-Cookie headers containing embedded CRLF (\r\n) sequences followed by whitespace or tab continuation lines, which is the injection vector used to smuggle additional cookie jar entries.
  • Inspect HTTP responses for Set-Cookie values that contain a quoted string with an embedded newline followed by a tab-delimited Netscape cookie jar format line (e.g., domain TRUE / FALSE <timestamp> name value), indicating an injection attempt.
  • Flag wget invocations that use both --load-cookies and --save-cookies against untrusted or external URLs, as this is the precondition for the attack to succeed.
  • The vulnerable code path is in the resp_new function in http.c; look for patches or binary signatures around CRLF handling in continuation lines in that function.
  • ·The attack only succeeds if the victim runs wget with both --load-cookies and --save-cookies pointing to the same jar file AND subsequently uses that jar against a targeted domain. Without both flags, the injected cookie cannot be leveraged.
  • ·Cookie replacement (overwriting an existing victim cookie) requires the attacker's server hostname to hash to a position below the targeted domain in the cookie jar hash table; otherwise the original cookie takes precedence.
  • ·Wget versions 1.7 through 1.19.4 are confirmed vulnerable; 1.19.5 and later contain the fix.

CVSS provenance

nvdv3.06.5MEDIUMCVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
nvdv2.04.3MEDIUMAV:N/AC:M/Au:N/C:N/I:P/A:N
osv6.5MEDIUM
vendor_debian6.5MEDIUM
vendor_redhat6.5MEDIUM
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.