Daniel Stenberg reported the following vulnerability in cURL that could cause libcurl-based HTTP clients to leak cookie information: IP address as domain problem By not detecting and rejecting domain names for partial literal IP addresses properly when parsing received HTTP cookies, libcurl can be fooled to both sending cookies to wrong sites and into allowing arbitrary sites to set cookies for others. For this problem to trigger, the client application must use the numerical IP address in the URL to access the site and the site must send back cookies to the site using domain= and a partial IP address. Since libcurl wrongly approaches the IP address like it was a normal domain name, a site at IP address 192.168.0.1 can set cookies for anything ending with .168.0.1 thus fooling libcurl to send them also to for example 127.168.0.1. The flaw requires dots to be present in the IP address, which restricts the flaw to IPv4 literal addresses or IPv6 addresses using the somewhat unusual "dotted-quad" style: "::ffff:192.0.2.128" This is not believed to be done by typical sites as this is not supported by clients that adhere to the rules of the RFC 6265, and many sites are written to explictly use their own specific named domain when sending cookies. Versions 7.1 up to and including 7.37.1 are affected. Information about how to enable cookies is available from http://curl.haxx.se/docs/http-cookies.html Acknowledgements: Red Hat would like to thank the cURL project for reporting this issue. Upstream acknowledges Tim Ruehsen as the original reporter.
Created attachment 933581 [details] patch from upstream
This issue can affect applications using curl if they enabled cookie support and are used to access HTTP/HTTPS servers using IP address rather than host name. To take advantage of the problem, attacker needs to trick victim into connecting to their malicious server using its IP address. The IP of the malicious server must have the last two or three octets of it match relevant octets of a non-malicious server IP victim normally connects to (i.e. using example from comment 0, if victim normally connects to 192.168.0.1, attack's malicious server must use an IP ending with 168.0.1 or 0.1). In such case, attacker's server can send cookies with crafted 'domain' attribute that will be sent to the target server. This can provide an attacker with a way to exploit other cookie handling bugs on the target server (e.g. session fixation issues, or other issues related to improper sanitization of cookie values). It does not seem this issue can lead to leak of cookies in any reasonable use case. A non-malicious server would have to incorrectly set 'domain' attributes on cookies it returns to risk their expose to other servers.
Statement: This issue affects the versions of curl as shipped with Red Hat Enterprise Linux 5 and is not planned to be corrected in future updates. Inktank Ceph Enterprise 1.1 and 1.2 receives only qualified Important and Critical impact security fixes. This issue has been rated as having Moderate security impact and is not currently planned to be addressed in future updates. For additional information, refer to the Inktank Ceph Enterprise Support Matrix: http://www.inktank.com/enterprise/support/
This issue is public now. External References: http://curl.haxx.se/docs/adv_20140910A.html
Created curl tracking bugs for this issue: Affects: fedora-all [bug 1140036]
Created mingw-curl tracking bugs for this issue: Affects: fedora-all [bug 1140037] Affects: epel-7 [bug 1140038]
curl-7.32.0-13.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.
curl-7.37.0-7.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.
curl-7.29.0-23.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report.
This issue has been addressed in the following products: Red Hat Enterprise Linux 6 Via RHSA-2015:1254 https://rhn.redhat.com/errata/RHSA-2015-1254.html
This issue has been addressed in the following products: Red Hat Enterprise Linux 7 Via RHSA-2015:2159 https://rhn.redhat.com/errata/RHSA-2015-2159.html