CVE-2019-10218: Path Traversal
A flaw was found in the samba client, all samba versions before samba 4.11.2, 4.10.10 and 4.9.15, where a malicious server can supply a pathname to the client with separators. This could allow the client to access files and folders outside of the SMB network pathnames. An attacker could use this vulnerability to create files outside of the current working directory using the privileges of the client user.
Other sources
As per upstream advisory:
Samba client code (libsmbclient) returns server-supplied filenames to calling code without checking for pathname separators (such as "/" or "../") in the server returned names.
A malicious server can craft a pathname containing separators and return this to client code, causing the client to use this access local pathnames for reading or writing instead of SMB network pathnames.
This access is done using the local privileges of the client.
This attack can be achieved using any of SMB1/2/3 as it is not reliant on any specific SMB protocol version.
Specifically, samba client tools like smbget and smbclient's mget use the server supplied 'final' name component as a local name when obtaining multiple files. While the design of these tools is that server can always choose the file names, this vulnerability is that it allows a remote server to create local files outside the current working directory.
Users of the libsmbclient library external to Samba may also be vulnerable if they use server returned filenames without adequate checking and pass them to functions that do local filesystem access.
Note that the Gnome GVFS client library is not believed to be vulnerable, as it always passes server-returned pathnames back to the SMB share they were returned from. Such malformed pathnames are then rejected by the server.
Upstream bug: https://bugzilla.samba.org/showbug.cgi?id=14071
— Red Hat
Affected Software
Event History
Frequently Asked Questions
What is CVE-2019-10218?
CVE-2019-10218 is a vulnerability found in the Samba client in all versions before 4.11.2, 4.10.10, and 4.9.15, allowing a malicious server to supply a pathname with separators to access files and folders outside of the SMB network pathnames.
What is the severity of CVE-2019-10218?
CVE-2019-10218 has a severity rating of 6.5 (medium).
How does CVE-2019-10218 impact Samba?
CVE-2019-10218 allows a malicious server to manipulate the Samba client by supplying a pathname with separators, potentially granting unauthorized access to files and folders outside of the intended network pathnames.
Which versions of Samba are affected by CVE-2019-10218?
CVE-2019-10218 affects all Samba versions before 4.11.2, 4.10.10, and 4.9.15.
How can I mitigate CVE-2019-10218?
To mitigate CVE-2019-10218, it is recommended to update Samba to version 4.11.2, 4.10.10, or 4.9.15, which contain the necessary security patches.