CVE-2013-1944
cookie domain tailmatch
Project curl Security Advisory, April 12th 2013 Permalink
VULNERABILITY
libcurl is vulnerable to a cookie leak vulnerability when doing requests across domains with matching tails.
When communicating over HTTP(S) and having libcurl's cookie engine enabled, libcurl stores and holds cookies for use when subsequent requests are done to hosts and paths that match those kept cookies. Due to a bug in the tailmatching function, libcurl could wrongly send cookies meant for the domain 'ample.com' when communicating with 'example.com'.
This vulnerability can be used to hijack sessions in targeted attacks since registering domains using a known domain's name as an ending is trivial.
Both curl the command line tool and applications using the libcurl library are vulnerable.
INFO
The Common Vulnerabilities and Exposures (CVE) project has assigned the name CVE-2013-1944 to this issue.
CWE-201: Information Exposure Through Sent Data
Severity: High
AFFECTED VERSIONS
Affected versions: curl 4.7 to and including 7.29.0
Not affected versions: curl < 4.7 and curl >= 7.30.0
Introduced-in: https://github.com/curl/curl/commit/ae1912cb0d494b48d
libcurl is used by many applications, but not always advertised as such!
SOLUTION
libcurl 7.30.0 implements the function properly and does not send cookies to sites just because the hostnames use the same tail.
RECOMMENDATIONS
We suggest you take one of the following actions immediately, in order of preference:
A - Upgrade to curl and libcurl 7.30.0
B - Apply the patch and rebuild libcurl
C - Disable use of cookies or HTTP entirely in your application
TIMELINE
It was reported (publicly) to the curl project on April 9th 2013.
curl 7.30.0 was released on April 12th 2013, coordinated with the publication of this advisory.
CREDITS
- Reported-by: YAMADA Yasuharu
- Patched-by: YAMADA Yasuharu
Thanks a lot!