Cookie handling in browsers can break HTTPS security

The lack of cookie integrity verification in browsers can allow hackers to extract information from encrypted Web connections.

Cookies, the files that websites create in browsers to remember logged-in users and track other information about them, could be abused by attackers to extract sensitive information from encrypted HTTPS connections.

The issue stems from the fact that the HTTP State Management standard, or RFC 6265, which defines how cookies should be created and handled, does not specify any mechanism for isolating them or checking their integrity.

As such, Web browsers don't always authenticate the domains that set cookies. That allows malicious attackers to inject cookies via plain HTTP connections that would later be transmitted for HTTPS connections instead of those set by the HTTPS sites themselves, the CERT Coordination Center (CERT/CC) at Carnegie Mellon University said in an advisory Thursday.

One of the reasons why this happens is because subdomains can set cookies that are valid for their parent domains or other subdomains.

For example, if sets a cookie with the domain attribute of, that cookie might be sent by the browser to as well. The site hosted on subdomain2 might not be able to differentiate between its own cookie and the rogue one.

Cookies are also not isolated by port number or scheme. A server can host multiple websites accessible via the same domain, but on different port numbers. Those websites will be able to read and write each other's cookies.

All these inconsistencies can allow man-in-the-middle attackers to perform so-called cookie injection or cookie tossing attacks that can be used to extract sensitive information from HTTPS connections.

A team of researchers from University of California, Berkeley, Tsinghua University in Beijing, the International Computer Science Institute and Microsoft tested the implications of such attacks on different high-profile HTTPS websites and presented their findings in August at the USENIX conference.

They found that they could hijack users' chat gadgets in the Gmail interface, steal Google search histories, steal credit card information on China UnionPay's website, hijack deposits on, hijack Google OAuth and BitBucket associations, track and manipulate shopping carts on e-commerce sites, track purchase history on and more.

"Some web browser vendors have noted previous attempts at more secure cookie management have been foiled due to the lack of a widely implemented standard," the CERT/CC said in its advisory.

Until the standards bodies come up with a solution, the issue can be mitigated if websites use the HTTP Strict Transport Security (HSTS) mechanism to force browsers to always access them over secure HTTPS connections.

The latest versions of all major browsers support HSTS, but in order for this mechanism to be effective against cookie injection attacks, websites also need to implement it.

Unfortunately, HSTS adoption across HTTPS-enabled websites remains low. According to the latest statistics from the SSL Pulse project, only 4.5 percent of the Internet's top 145,000 HTTPS websites currently support HSTS.

Join the Good Gear Guide newsletter!

Error: Please check your email address.

Our Back to Business guide highlights the best products for you to boost your productivity at home, on the road, at the office, or in the classroom.

Keep up with the latest tech news, reviews and previews by subscribing to the Good Gear Guide newsletter.

Lucian Constantin

IDG News Service
Show Comments

Most Popular Reviews

Latest News Articles


GGG Evaluation Team

Kathy Cassidy


First impression on unpacking the Q702 test unit was the solid feel and clean, minimalist styling.

Anthony Grifoni


For work use, Microsoft Word and Excel programs pre-installed on the device are adequate for preparing short documents.

Steph Mundell


The Fujitsu LifeBook UH574 allowed for great mobility without being obnoxiously heavy or clunky. Its twelve hours of battery life did not disappoint.

Andrew Mitsi


The screen was particularly good. It is bright and visible from most angles, however heat is an issue, particularly around the Windows button on the front, and on the back where the battery housing is located.

Simon Harriott


My first impression after unboxing the Q702 is that it is a nice looking unit. Styling is somewhat minimalist but very effective. The tablet part, once detached, has a nice weight, and no buttons or switches are located in awkward or intrusive positions.

Featured Content

Latest Jobs

Don’t have an account? Sign up here

Don't have an account? Sign up now

Forgot password?