|
5 | 5 | .\" * | (__| |_| | _ <| |___ |
6 | 6 | .\" * \___|\___/|_| \_\_____| |
7 | 7 | .\" * |
8 | | -.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. |
| 8 | +.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al. |
9 | 9 | .\" * |
10 | 10 | .\" * This software is licensed as described in the file COPYING, which |
11 | 11 | .\" * you should have received as part of this distribution. The terms |
@@ -217,6 +217,32 @@ avoid that, keep control of what URLs to use and/or prevent curl/libcurl from |
217 | 217 | using the protocol. |
218 | 218 |
|
219 | 219 | By default, libcurl prohibits redirects to file:// URLs. |
| 220 | + |
| 221 | +.SH "Warning: file:// on Windows" |
| 222 | +The Windows operating system will automatically, and without any way for |
| 223 | +applications to disable it, try to establish a connection to another host over |
| 224 | +the network and access it (over SMB or other protocols), if only the correct |
| 225 | +file path is accessed. |
| 226 | + |
| 227 | +When first realizing this, the curl team tried to filter out such attempts in |
| 228 | +order to protect applications for inadvertent probes of for example internal |
| 229 | +networks etc. This resulted in CVE-2019-15601 and the associated security fix. |
| 230 | + |
| 231 | +However, we've since been made aware of the fact that the previous fix was far |
| 232 | +from adequate as there are several other ways to accomplish more or less the |
| 233 | +same thing: accessing a remote host over the network instead of the local file |
| 234 | +system. |
| 235 | + |
| 236 | +The conclusion we have come to is that this is a weakness or feature in the |
| 237 | +Windows operating system itself, that we as an application cannot safely |
| 238 | +protect users against. It would just be a whack-a-mole race we don't want to |
| 239 | +participate in. There are too many ways to do it and there's no knob we can |
| 240 | +use to turn off the practice. |
| 241 | + |
| 242 | +If you use curl or libcurl on Windows (any version), disable the use of the |
| 243 | +FILE protocol in curl or be prepared that accesses to a range of "magic paths" |
| 244 | +will potentially make your system try to access other hosts on your |
| 245 | +network. curl cannot protect you against this. |
220 | 246 | .SH "What if the user can set the URL" |
221 | 247 | Applications may find it tempting to let users set the URL that it can work |
222 | 248 | on. That's probably fine, but opens up for mischief and trickery that you as |
|
0 commit comments