CVE Vulnerabilities

CVE-2009-0037

Cross-Site Request Forgery (CSRF)

Published: Mar 05, 2009 | Modified: Oct 11, 2018
CVSS 3.x
N/A
Source:
NVD
CVSS 2.x
6.8 MEDIUM
AV:N/AC:M/Au:N/C:P/I:P/A:P
RedHat/V2
4.3 MODERATE
AV:N/AC:M/Au:N/C:P/I:N/A:N
RedHat/V3
Ubuntu
MEDIUM

The redirect implementation in curl and libcurl 5.11 through 7.19.3, when CURLOPT_FOLLOWLOCATION is enabled, accepts arbitrary Location values, which might allow remote HTTP servers to (1) trigger arbitrary requests to intranet servers, (2) read or overwrite arbitrary files via a redirect to a file: URL, or (3) execute arbitrary commands via a redirect to an scp: URL.

Weakness

The web application does not, or can not, sufficiently verify whether a well-formed, valid, consistent request was intentionally provided by the user who submitted the request.

Affected Software

Name Vendor Start Version End Version
Curl Curl 5.11 (including) 5.11 (including)
Curl Curl 6.0 (including) 6.0 (including)
Curl Curl 6.1beta (including) 6.1beta (including)
Curl Curl 6.2 (including) 6.2 (including)
Curl Curl 6.3 (including) 6.3 (including)
Curl Curl 6.3.1 (including) 6.3.1 (including)
Curl Curl 6.4 (including) 6.4 (including)
Curl Curl 6.5 (including) 6.5 (including)
Curl Curl 6.5.1 (including) 6.5.1 (including)
Curl Curl 6.5.2 (including) 6.5.2 (including)
Curl Curl 7.1 (including) 7.1 (including)
Curl Curl 7.1.1 (including) 7.1.1 (including)
Curl Curl 7.2 (including) 7.2 (including)
Curl Curl 7.2.1 (including) 7.2.1 (including)
Curl Curl 7.3 (including) 7.3 (including)
Curl Curl 7.4 (including) 7.4 (including)
Curl Curl 7.4.1 (including) 7.4.1 (including)
Curl Curl 7.4.2 (including) 7.4.2 (including)
Curl Curl 7.5 (including) 7.5 (including)
Curl Curl 7.5.1 (including) 7.5.1 (including)
Curl Curl 7.5.2 (including) 7.5.2 (including)
Curl Curl 7.6 (including) 7.6 (including)
Curl Curl 7.6.1 (including) 7.6.1 (including)
Curl Curl 7.7 (including) 7.7 (including)
Curl Curl 7.7.1 (including) 7.7.1 (including)
Curl Curl 7.7.2 (including) 7.7.2 (including)
Curl Curl 7.7.3 (including) 7.7.3 (including)
Curl Curl 7.8 (including) 7.8 (including)
Curl Curl 7.8.1 (including) 7.8.1 (including)
Curl Curl 7.8.2 (including) 7.8.2 (including)
Curl Curl 7.9 (including) 7.9 (including)
Curl Curl 7.9.1 (including) 7.9.1 (including)
Curl Curl 7.9.2 (including) 7.9.2 (including)
Curl Curl 7.9.3 (including) 7.9.3 (including)
Curl Curl 7.9.4 (including) 7.9.4 (including)
Curl Curl 7.9.5 (including) 7.9.5 (including)
Curl Curl 7.9.6 (including) 7.9.6 (including)
Curl Curl 7.9.7 (including) 7.9.7 (including)
Curl Curl 7.9.8 (including) 7.9.8 (including)
Curl Curl 7.10 (including) 7.10 (including)
Curl Curl 7.10.1 (including) 7.10.1 (including)
Curl Curl 7.10.2 (including) 7.10.2 (including)
Curl Curl 7.10.3 (including) 7.10.3 (including)
Curl Curl 7.10.4 (including) 7.10.4 (including)
Curl Curl 7.10.5 (including) 7.10.5 (including)
Curl Curl 7.10.6 (including) 7.10.6 (including)
Curl Curl 7.10.7 (including) 7.10.7 (including)
Curl Curl 7.10.8 (including) 7.10.8 (including)
Curl Curl 7.11.1 (including) 7.11.1 (including)
Curl Curl 7.12 (including) 7.12 (including)
Curl Curl 7.12.1 (including) 7.12.1 (including)
Curl Curl 7.12.2 (including) 7.12.2 (including)
Curl Curl 7.13 (including) 7.13 (including)
Curl Curl 7.13.2 (including) 7.13.2 (including)
Curl Curl 7.14 (including) 7.14 (including)
Curl Curl 7.14.1 (including) 7.14.1 (including)
Curl Curl 7.15 (including) 7.15 (including)
Curl Curl 7.15.1 (including) 7.15.1 (including)
Curl Curl 7.15.3 (including) 7.15.3 (including)
Curl Curl 7.16.3 (including) 7.16.3 (including)
Curl Curl 7.16.4 (including) 7.16.4 (including)
Curl Curl 7.17 (including) 7.17 (including)
Curl Curl 7.18 (including) 7.18 (including)
Curl Curl 7.19.3 (including) 7.19.3 (including)
Libcurl Curl 5.11 (including) 5.11 (including)
Libcurl Curl 7.12 (including) 7.12 (including)
Libcurl Curl 7.12.1 (including) 7.12.1 (including)
Libcurl Curl 7.12.2 (including) 7.12.2 (including)
Libcurl Curl 7.12.3 (including) 7.12.3 (including)
Libcurl Curl 7.13 (including) 7.13 (including)
Libcurl Curl 7.13.1 (including) 7.13.1 (including)
Libcurl Curl 7.13.2 (including) 7.13.2 (including)
Libcurl Curl 7.14 (including) 7.14 (including)
Libcurl Curl 7.14.1 (including) 7.14.1 (including)
Libcurl Curl 7.15 (including) 7.15 (including)
Libcurl Curl 7.15.1 (including) 7.15.1 (including)
Libcurl Curl 7.15.2 (including) 7.15.2 (including)
Libcurl Curl 7.15.3 (including) 7.15.3 (including)
Libcurl Curl 7.16.3 (including) 7.16.3 (including)
Libcurl Curl 7.19.3 (including) 7.19.3 (including)
Red Hat Enterprise Linux 2.1 RedHat curl-0:7.8-3.rhel2 *
Red Hat Enterprise Linux 3 RedHat curl-0:7.10.6-9.rhel3 *
Red Hat Enterprise Linux 4 RedHat curl-0:7.12.1-11.1.el4_7.1 *
Red Hat Enterprise Linux 5 RedHat curl-0:7.15.5-2.1.el5_3.4 *
Curl Ubuntu dapper *
Curl Ubuntu devel *
Curl Ubuntu gutsy *
Curl Ubuntu hardy *
Curl Ubuntu intrepid *

Potential Mitigations

  • Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid.
  • For example, use anti-CSRF packages such as the OWASP CSRFGuard. [REF-330]
  • Another example is the ESAPI Session Management control, which includes a component for CSRF. [REF-45]
  • Use the “double-submitted cookie” method as described by Felten and Zeller:
  • When a user visits a site, the site should generate a pseudorandom value and set it as a cookie on the user’s machine. The site should require every form submission to include this value as a form value and also as a cookie value. When a POST request is sent to the site, the request should only be considered valid if the form value and the cookie value are the same.
  • Because of the same-origin policy, an attacker cannot read or modify the value stored in the cookie. To successfully submit a form on behalf of the user, the attacker would have to correctly guess the pseudorandom value. If the pseudorandom value is cryptographically strong, this will be prohibitively difficult.
  • This technique requires Javascript, so it may not work for browsers that have Javascript disabled. [REF-331]

References