Technical impact
Improper Limitation of a Pathname to a Restricted Directory (Path Traversal) vulnerability exists in the Erlang OTP ssh_sftpd module. The server determines whether a requested path is within the configured root using a simple string prefix comparison via lists:prefix/2, instead of validating path components. Because of this flaw, an authenticated user can provide a path that shares a common name prefix with the root directory, such as /home/user10 when the root is set to /home/user1, and the server will mistakenly treat the path as inside the root. This allows the attacker to read, modify, or delete files that are actually located outside the intended directory. The issue is present in OTP 17.0 through OTP 26.2.5.18, OTP 27.3.4.9, and OTP 28.4.1 (corresponding to ssh 3.0.1 through 5.1.4.14, 5.2.11.6, and 5.5.1). The impact on earlier OTP versions is unknown. The vulnerability affects the files lib/ssh/src/ssh_sftpd.erl and the routine ssh_sftpd:is_within_root/2 and is identified as CWE‑22.
Affected Systems
The vulnerability affects Erlang/OTP releases from OTP 17.0 through OTP 28.4.1, and specific builds 27.3.4.9 and 26.2.5.18. Corresponding ssh module versions that contain the flaw range from ssh 3.0.1 through 5.5.1, 5.2.11.6, and 5.1.4.14. Systems running these OTP or ssh releases with an exposed SFTP service for authenticated users are vulnerable.
Risk and Exploitability
Based on the description, it is inferred that the attacker must first authenticate to the SFTP service. The weakness permits traversal to sibling directories that share a name prefix, effectively escaping the configured root. The CVSS score is 5.3 (medium), the EPSS score is <1%, and the vulnerability is not listed in the CISA KEV catalog, indicating a low but tangible risk. While the exploitation does not require additional privileges beyond SFTP authentication, the potential for unauthorized file access makes this a significant concern for multi‑tenant or shared environments. The likely attack vector is a local SFTP connection from a trusted or compromised client that supplies malicious path names.
Debian DLA