Linos Giannopoulos 6080ea098d
libcurl: Restrict redirect schemes
All protocols except for CURLPROTO_FILE/CURLPROTO_SMB and their TLS
counterpart were allowed for redirect. This vastly broadens the
exploitation surface in case of a vulnerability such as SSRF [1], where
libcurl-based clients are forced to make requests to arbitrary hosts.

For instance, CURLPROTO_GOPHER can be used to smuggle any TCP-based
protocol by URL-encoding a payload in the URI. Gopher will open a TCP
connection and send the payload.

Only HTTP/HTTPS and FTP are allowed. All other protocols have to be
explicitly enabled for redirects through CURLOPT_REDIR_PROTOCOLS.

[1]: https://www.acunetix.com/blog/articles/server-side-request-forgery-vulnerability/

Signed-off-by: Linos Giannopoulos <lgian@skroutz.gr>

Closes #4094
2019-07-14 16:29:55 +02:00
..
2019-06-05 20:38:06 +02:00
2019-03-03 11:17:52 +01:00
2019-03-15 10:22:42 +01:00
2019-03-15 10:22:42 +01:00
2018-12-03 23:13:40 +01:00
2018-09-23 22:24:02 +00:00
2019-02-10 18:38:57 +01:00
2019-07-06 23:25:20 -04:00
2018-09-23 22:24:02 +00:00
2019-06-05 20:38:06 +02:00
2019-03-01 17:30:34 +01:00
2018-09-23 22:24:02 +00:00
2019-03-01 17:30:34 +01:00
2019-05-20 08:51:11 +02:00
2019-05-13 08:17:09 +02:00
2018-09-23 22:24:02 +00:00
2018-09-23 22:24:02 +00:00
2018-09-23 22:24:02 +00:00
2018-09-23 22:24:02 +00:00
2019-05-13 08:17:09 +02:00
2019-05-13 08:17:09 +02:00
2019-06-05 20:38:06 +02:00
2019-03-01 17:30:34 +01:00
2019-03-01 17:30:34 +01:00
2019-03-05 08:01:50 +01:00
2018-06-11 11:14:48 +02:00
2019-05-20 08:51:11 +02:00
2018-09-23 22:24:02 +00:00
2019-05-20 08:51:11 +02:00
2019-05-17 23:24:34 +02:00
2018-09-23 22:24:02 +00:00
2019-06-05 20:38:06 +02:00
2018-09-23 22:24:02 +00:00
2019-05-20 08:51:11 +02:00
2018-09-23 22:24:02 +00:00
2019-07-06 23:25:20 -04:00
2019-05-20 08:51:11 +02:00
2018-12-10 00:10:04 +01:00
2018-09-23 22:24:02 +00:00
2018-09-23 22:24:02 +00:00
2018-09-23 22:24:02 +00:00
2018-09-23 22:24:02 +00:00
2019-05-20 08:51:11 +02:00
2019-05-20 08:51:11 +02:00
2019-05-13 08:17:09 +02:00
2019-05-13 08:17:09 +02:00
2018-02-23 23:29:01 +00:00
2019-04-06 22:49:50 +02:00
2019-05-17 23:24:34 +02:00
2019-02-12 10:24:29 +01:00
2018-09-23 22:24:02 +00:00
2019-05-13 08:17:10 +02:00
2018-09-23 22:24:02 +00:00
2019-06-05 20:38:06 +02:00
2019-06-18 22:33:26 +02:00
2018-09-23 22:24:02 +00:00
2018-09-23 22:24:02 +00:00
2019-07-08 13:19:35 +02:00
2018-06-11 11:14:48 +02:00
2018-09-23 22:24:02 +00:00
2018-09-23 22:24:02 +00:00
2018-09-23 22:24:02 +00:00
2018-07-30 17:59:36 +02:00
2019-06-05 20:38:06 +02:00
2018-09-23 22:24:02 +00:00
2018-09-23 22:24:02 +00:00
2019-06-05 20:38:06 +02:00
2019-05-20 08:51:11 +02:00
2018-09-01 10:40:42 +02:00
2018-08-21 18:53:43 +02:00
2019-07-11 02:27:04 -04:00
2019-03-01 17:30:34 +01:00
2018-09-23 22:24:02 +00:00
2018-09-23 22:24:02 +00:00
2019-04-11 21:08:44 +02:00
2019-07-06 23:25:20 -04:00
2019-07-14 16:29:55 +02:00