SFTP READLINK Leaks Absolute Backend Filesystem Path When Root Is Configured
Erlang OTP
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Erlang OTP |
| No fix yet |
| Erlang OTP |
| No fix yet |
| Erlang OTP |
|
|
Erlang OTP
| Product | Affected | Fixed in |
|---|---|---|
| Erlang OTP |
| No fix yet |
| Erlang OTP |
| No fix yet |
| Erlang OTP |
|
|
Exposure of Sensitive Information to an Unauthorized Actor vulnerability in Erlang OTP ssh (ssh_sftpd module) allows File Discovery.
The SSH_FXP_READLINK handler in ssh_sftpd sends the raw result of file:read_link/2 to the client without calling chroot_filename/2 to strip the backend root prefix. An authenticated SFTP client can create a symlink inside the chroot pointing to /; ssh_sftpd resolves the target to the absolute backend root and stores it on disk. Reading the symlink back via SSH_FXP_READLINK returns that absolute path, for example /data/sftp, instead of the chrooted value /.
The information disclosed is the absolute filesystem path of the SFTP root directory and of any symlink targets within it. No file contents, credentials, or access to paths outside the root directory are obtainable through this issue alone.
This vulnerability is associated with program files lib/ssh/src/ssh_sftpd.erl.
This issue affects OTP from OTP 17.0 before OTP 27.3.4.13, OTP 28.5.0.2, and OTP 29.0.2, corresponding to ssh from 3.0.1 before 5.2.11.8, 5.5.2.1, and 6.0.1. Whether OTP before OTP 17.0, corresponding to ssh before 3.0.1, is affected is unknown.
From the CVE record · EEF
Erlang OTP’s ssh_sftpd module can return absolute backend filesystem paths instead of chroot-relative paths when handling SFTP symlink reads. An authenticated SFTP client can use this to discover the SFTP root path and symlink targets within it; this issue alone does not expose file contents or provide access outside the root.
Operators running Erlang OTP 17.0 through versions before the applicable fixes in 27.3.4.13, 28.5.0.2, or 29.0.2, or the corresponding ssh package versions from 3.0.1 before 5.2.11.8, 5.5.2.1, or 6.0.1, should check their installations; whether earlier versions are affected is unknown.