The annual curl user survey is up. Please donate a few minutes and answer some questions!
curl / Docs / Security Problems / cookie leak for TLDs

cookie leak for TLDs

Project curl Security Advisory, September 10th 2014 Permalink

VULNERABILITY

libcurl wrongly allows cookies to be set for Top Level Domains (TLDs), thus making them apply broader than cookies are allowed. This can allow arbitrary sites to set cookies that then would get sent to a different and unrelated site or domain.

INFO

Cookie parsing and use is opt-in by applications and is not enabled by default.

libcurl's cookie parser has no Public Suffix awareness, so apart from rejecting TLDs from being allowed it might still allow cookies for domains that are otherwise widely rejected by ordinary browsers. See https://publicsuffix.org/ for details.

The Common Vulnerabilities and Exposures (CVE) project has assigned the name CVE-2014-3620 to this issue.

CWE-201: Information Exposure Through Sent Data

AFFECTED VERSIONS

libcurl is used by many applications, but not always advertised as such!

THE SOLUTION

libcurl 7.38.0 doesn't accept cookies set for just a TLD. Note that it does not add any public suffix awareness apart from that.

A patch for this problem is available.

RECOMMENDATIONS

We suggest you take one of the following actions immediately, in order of preference:

A - Upgrade to curl and libcurl 7.38.0

B - Apply the patch and rebuild libcurl

C - Avoid using cookies in your application

TIME LINE

It was reported to the curl project on August 15th 2014. We contacted distros@openwall on September 1st.

libcurl 7.38.0 was released on September 10th 2014, coordinated with the publication of this advisory.

CREDITS

Reported by Tim Ruehsen. Patch written by Daniel Stenberg.

Thanks a lot!