Cookies from HTTPS sessions can leak data

Vulnerability in cookies allows hackers to access private information from HTTPS sessions

If you thought HTTPS sessions were private and secure, you will have to change your opinion because according to US CERT, the vulnerability in the cookies can be exploited by potential hackers to steal private information.

According to the vulnerability note published by CERT on Thursday, cookies that have been established via HTTP requests represent a security flaw for HTTPS sessions, due to the fact that they do not provide “integrity guarantees for sibling domains”.

The vulnerability is cookie management is due to the fact that the web browsers do not always authenticate the domain that is setting a cookie, which could let an attacker set a cookie that could later be used via an HTTPS connection instead of the cookie set by the actual site. By exploiting other vulnerabilities in the server, the attacker-controlled cookie can be used to access private information.

“A malicious attacker can utilize this to set a cookie that is later used via an HTTPS connection instead of the cookie set by the actual site; for example, an attacker may set cookies for example.com that override the real cookie for www.example.com when the victim is loading HTTPS content,” the CERT advisory states.

The researchers made the vulnerability public in a paper published at USENIX Security 2015, which warned that while there are cookies that contain a secure flag indicating that it should be sent only over an HTTPS connection, there is no flag to indicate how a cookie was set. Exploiting this vulnerability, potential hackers can conduct man-in-the-middle attacks on an HTTP session by injecting cookies that can be attached to subsequent HTTPS connections.

According to the researchers , Google and Bank of America are affected by this vulnerability. They also said that it affects almost all the major web browsers, including Chrome, Firefox, Internet Explorer, and Safari.

The vulnerability can be overcome by safer handling of cookies through updating the same origin policy for cookies, CERT explained

To mitigate the attack, CERT advises website operators to deploy HSTS on the top-level domain they control, and to use the includeSubDomains option, which limits an attacker’s ability to set top-level cookies capable of overriding the subdomain ones. End-users should update their browsers to ensure that they have full HSTS support, CERT said.

The vulnerabilities in cookies were first reported in April 2011 by IETF through a paper called, HTTP State Management Mechanism. The paper explains that when it comes to sibling domains and their subdomains, it is often possible that one server cannot distinguish between a cookie set by the other server and one set by itself. Thus, one server can be used to leverage an attack against the other.

Another critical problem with cookies is that they do not offer isolation by port, which means that, if a cookie is readable/writable by a service running on a port of a server, it is also readable/writable to services running on other ports. Moreover, cookies used with HTTP and HTTPS schemes for a given host can also be used with other schemes, including ftp and gopher.

LEAVE A REPLY

Please enter your comment!
Please enter your name here