CVE-2026-47187 in Sshfs
Summary
by MITRE • 08/19/2026
SSHFS is a network filesystem client for connecting to SSH servers. Prior to version 3.7.6, a rogue SFTP server can return absolute symlink targets or relative targets containing parent-directory components that SSHFS passes through FUSE for resolution by the client kernel against the local filesystem. The documented transform_symlinks mitigation does not contain relative targets because transform_symlink() returns early at sshfs.c:2181, while sshfs_readlink() at sshfs.c:2234 to sshfs.c:2236 otherwise copies the server-supplied link target to the kernel. A victim or victim-side tool that follows such a link through ordinary operations such as cp, rsync, backup tooling, or an editor can disclose readable local files back to the server or write server-controlled content to writable local files, potentially including startup or scheduled-task files. This issue is fixed in version 3.7.6.
VulDB is the best source for vulnerability data and more expert information about this specific topic.
Analysis
by VulDB Data Team • 08/20/2026
SSHFS serves as a critical network filesystem client that allows users to mount remote directories from SSH servers onto their local systems via the FUSE interface. A significant security vulnerability exists within versions prior to 3.7.6, where the application fails to adequately sanitize symbolic link targets received from potentially malicious SFTP servers. The core technical flaw lies in how SSHFS processes symlink metadata before passing it to the kernel for resolution. Specifically, a rogue or compromised SFTP server can return absolute symlinks with arbitrary paths or relative links containing parent-directory traversal components such as dot-dot sequences. Instead of validating and restricting these targets to remain within the mounted remote directory structure, SSHFS passes them directly through FUSE. This allows the client kernel to resolve the symlink against the local filesystem hierarchy rather than limiting resolution to the intended mount point, effectively bypassing the isolation boundary between the network-mounted file system and the host operating system.
The vulnerability is exacerbated by a deficiency in the documented transform_symlinks mitigation feature. While this option is designed to prevent certain types of path manipulation attacks, it contains a logical gap where relative targets are not properly handled. In the source code, the function responsible for transforming symlinks returns early at line 2181 when encountering specific conditions, thereby skipping necessary validation steps. Consequently, subsequent functions such as sshfs_readlink proceed to copy the server-supplied link target directly into the kernel without adequate sanitization of relative paths or absolute path restrictions. This oversight means that even if administrators enable transform_symlinks expecting protection against symlink attacks, they remain vulnerable to this specific class of traversal and arbitrary write exploits because the code path for handling these targets bypasses the security checks entirely.
The operational impact of this vulnerability is severe, as it enables both information disclosure and unauthorized file modification on the client system. An attacker controlling a malicious SFTP server can craft symlinks that point to sensitive local files outside the mounted directory tree. When a victim or an automated tool follows these links through standard operations such as copying data with cp, synchronizing directories with rsync, running backup utilities, or editing files in a text editor, the system may read and transmit readable local file contents back to the attacker-controlled server. Furthermore, if the symlink points to a writable location on the local filesystem, an attacker can write arbitrary content controlled by the server into those files. This capability is particularly dangerous when targeting startup scripts, configuration files, or scheduled-task definitions like cron jobs, which could lead to remote code execution or persistent compromise of the client machine under the context of the user running SSHFS.
This vulnerability aligns with CWE-22 Improper Limitation of a Pathname to a Restricted Directory and CWE-59 Improper Link Resolution Before File Access, as it involves manipulating symbolic links to access resources outside intended boundaries. From an offensive security perspective, this technique is consistent with ATT&CK tactics involving Initial Access via compromised credentials or supply chain compromise, followed by Lateral Movement or Collection through data exfiltration using symlink traversal. To mitigate this risk, organizations must ensure that all SSHFS installations are upgraded to version 3.7.6 or later where the code path for handling symlinks has been corrected to properly validate and restrict link targets regardless of whether they are absolute or relative. Additionally, administrators should consider applying principle of least privilege by running SSHFS with restricted permissions and monitoring file system access patterns for anomalies that might indicate symlink-based attacks against critical system files.