curl / Docs / Security Problems / SMB access smuggling via FILE URL on Windows

SMB access smuggling via FILE URL on Windows

Project curl Security Advisory, January 8th 2020 - Permalink

VULNERABILITY

libcurl can be told to load a file from a FILE:// URL. It will then load the file from the path specified in the URL from the local file system.

If you craft the given path so that it starts with two slashes (or backslashes) followed by a host name, Windows systems will automatically treat that as a request to access the host name using SMB instead of reading a local file with that name. This is not expected nor documented libcurl behavior.

Applications allowing users to provide URLs or parts of URLs could be vulnerable to this flaw. Both the curl tool and library.

Example URL exploiting this: file://localhost//hostname/home/secret.txt.

We are not aware of any exploit of this flaw.

INFO

This bug only exists when libcurl runs on a Microsoft Windows operating system.

This bug exists in the first code import we have, from 1999.

The Common Vulnerabilities and Exposures (CVE) project has assigned the name CVE-2019-15601 to this issue.

CWE-20: Improper Input Validation

Severity: 3.0 (Low)

AFFECTED VERSIONS

libcurl is used by many applications, but not always advertised as such.

THE SOLUTION

A fix for CVE-2019-15601

RECOMMENDATIONS

We suggest you take one of the following actions immediately, in order of preference:

A - Upgrade curl to version 7.68.0

B - Apply the patch to your version and rebuild

C - do not use FILE:// URLs

TIMELINE

The issue was reported to the curl project on October 31, 2019. The initial fix was done, verified and communicated with the reporter on November 7, 2019.

This advisory was posted on January 8th 2020.

CREDITS

Reported by Fernando Muñoz. Patch by Daniel Stenberg.

Thanks a lot!