Description
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') vulnerability in Erlang OTP ssh (ssh_sftpd module) allows an authenticated SFTP user to modify file attributes outside the configured chroot directory.

The SFTP daemon (ssh_sftpd) stores the raw, user-supplied path in file handles instead of the chroot-resolved path. When SSH_FXP_FSETSTAT is issued on such a handle, file attributes (permissions, ownership, timestamps) are modified on the real filesystem path, bypassing the root directory boundary entirely.

Any authenticated SFTP user on a server configured with the root option can modify file attributes of files outside the intended chroot boundary. The prerequisite is that a target file must exist on the real filesystem at the same relative path. Note that this vulnerability only allows modification of file attributes; file contents cannot be read or altered through this attack vector.

If the SSH daemon runs as root, this enables direct privilege escalation: an attacker can set the setuid bit on any binary, change ownership of sensitive files, or make system configuration world-writable.

This vulnerability is associated with program files lib/ssh/src/ssh_sftpd.erl and program routines ssh_sftpd:do_open/4 and ssh_sftpd:handle_op/4.

This issue affects OTP from OTP 17.0 before OTP 28.4.3, OTP 27.3.4.11 and OTP 26.2.5.20, corresponding to ssh from 3.0.1 before 5.5.3, 5.2.11.7 and 5.1.4.15.
Published: 2026-04-21
Score: 5.3 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The Erlang OTP SSH daemon (ssh_sftpd module) has a path‑traversal vulnerability that enables an authenticated SFTP user to modify file attributes outside of a configured chroot directory. The daemon stores raw, user‑supplied paths unmodified in file handles, so when an SSH_FXP_FSETSTAT request is issued the file attributes of the real filesystem path are changed, circumventing the chroot boundary. Only the file attributes—permissions, ownership, and timestamps—can be altered; file contents remain inaccessible. If the SSH daemon runs with root privilege, this flaw permits privilege escalation by setting the set‑uid bit on binaries, changing ownership of sensitive files, or making system configuration files world‑writable.

Affected Systems

The vulnerability affects Erlang OTP releases from 17.0 through 28.4.3, as well as the specific sub‑releases 27.3.4.11 and 26.2.5.20. It applies to versions of the SSH component in OTP 3.01 through 5.5.3, 5.2.11.7, and 5.1.4.15. Any system that installs one of these Erlang OTP releases and configures the SSH server to use the ‘root’ option for the SFTP subsystem is susceptible.

Risk and Exploitability

A remote attacker gains an SFTP session to an affected server that is configured with the root option. The exploit requires the target file to exist on the host at the same relative path; no content read or write is possible. If the SSH daemon is running as root, the attacker can remap executable binaries, assign set‑uid bits, alter ownership of sensitive files, or make system configuration files world‑writable, effectively bypassing the chroot and escalating privileges. The CVSS score is 5.3, indicating a moderate severity. The EPSS score is < 1 %, suggesting a very low current exploitation probability, and the vulnerability is not listed in CISA’s KEV catalog. Nonetheless, the potential impact of privilege escalation warrants a timely response.

Generated by OpenCVE AI on August 3, 2026 at 07:57 UTC.

Remediation

Vendor Workaround

* Do not use the root option in ssh_sftpd:subsystem_spec/1, and instead rely on OS-level chroot or container isolation to confine SFTP users. * Ensure the Erlang VM is not running as a privileged OS user. Running the VM as an unprivileged user limits the impact of this vulnerability, since attribute modifications are constrained by that user's OS-level permissions.


OpenCVE Recommended Actions

  • Rely on operating‑system level chroot or container isolation rather than the SSH root option – do not use the root option in ssh_sftpd:subsystem_spec/1.
  • Run the Erlang virtual machine as an unprivileged OS user – a non‑privileged VM limits the damage that can be caused by modified file attributes.
  • Upgrade Erlang OTP to the latest version that contains the SSH fsetstat patch; consult the Erlang project releases for a fixed build or apply the vendor‑supplied advisory to update the otp/ssh component.

Generated by OpenCVE AI on August 3, 2026 at 07:57 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 24 Jul 2026 18:30:00 +0000

Type Values Removed Values Added
Description Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') vulnerability in Erlang OTP ssh (ssh_sftpd module) allows an authenticated SFTP user to modify file attributes outside the configured chroot directory. The SFTP daemon (ssh_sftpd) stores the raw, user-supplied path in file handles instead of the chroot-resolved path. When SSH_FXP_FSETSTAT is issued on such a handle, file attributes (permissions, ownership, timestamps) are modified on the real filesystem path, bypassing the root directory boundary entirely. Any authenticated SFTP user on a server configured with the root option can modify file attributes of files outside the intended chroot boundary. The prerequisite is that a target file must exist on the real filesystem at the same relative path. Note that this vulnerability only allows modification of file attributes; file contents cannot be read or altered through this attack vector. If the SSH daemon runs as root, this enables direct privilege escalation: an attacker can set the setuid bit on any binary, change ownership of sensitive files, or make system configuration world-writable. This vulnerability is associated with program files lib/ssh/src/ssh_sftpd.erl and program routines ssh_sftpd:do_open/4 and ssh_sftpd:handle_op/4. This issue affects OTP from OTP 17.0 until OTP 28.4.3, 27.3.4.11, and 26.2.5.20 corresponding to ssh from 3.01 until 5.5.3, 5.2.11.7, and 5.1.4.15. Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') vulnerability in Erlang OTP ssh (ssh_sftpd module) allows an authenticated SFTP user to modify file attributes outside the configured chroot directory. The SFTP daemon (ssh_sftpd) stores the raw, user-supplied path in file handles instead of the chroot-resolved path. When SSH_FXP_FSETSTAT is issued on such a handle, file attributes (permissions, ownership, timestamps) are modified on the real filesystem path, bypassing the root directory boundary entirely. Any authenticated SFTP user on a server configured with the root option can modify file attributes of files outside the intended chroot boundary. The prerequisite is that a target file must exist on the real filesystem at the same relative path. Note that this vulnerability only allows modification of file attributes; file contents cannot be read or altered through this attack vector. If the SSH daemon runs as root, this enables direct privilege escalation: an attacker can set the setuid bit on any binary, change ownership of sensitive files, or make system configuration world-writable. This vulnerability is associated with program files lib/ssh/src/ssh_sftpd.erl and program routines ssh_sftpd:do_open/4 and ssh_sftpd:handle_op/4. This issue affects OTP from OTP 17.0 before OTP 28.4.3, OTP 27.3.4.11 and OTP 26.2.5.20, corresponding to ssh from 3.0.1 before 5.5.3, 5.2.11.7 and 5.1.4.15.

Thu, 21 May 2026 15:30:00 +0000

Type Values Removed Values Added
First Time appeared Erlang erlang\/ssh
CPEs cpe:2.3:a:erlang:erlang\/ssh:*:*:*:*:*:*:*:*
Vendors & Products Erlang erlang\/ssh
Metrics cvssV3_1

{'score': 4.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N'}


Tue, 21 Apr 2026 17:30:00 +0000

Type Values Removed Values Added
First Time appeared Erlang otp
Vendors & Products Erlang otp

Tue, 21 Apr 2026 14:15:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Tue, 21 Apr 2026 12:15:00 +0000

Type Values Removed Values Added
Description Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') vulnerability in Erlang OTP ssh (ssh_sftpd module) allows an authenticated SFTP user to modify file attributes outside the configured chroot directory. The SFTP daemon (ssh_sftpd) stores the raw, user-supplied path in file handles instead of the chroot-resolved path. When SSH_FXP_FSETSTAT is issued on such a handle, file attributes (permissions, ownership, timestamps) are modified on the real filesystem path, bypassing the root directory boundary entirely. Any authenticated SFTP user on a server configured with the root option can modify file attributes of files outside the intended chroot boundary. The prerequisite is that a target file must exist on the real filesystem at the same relative path. Note that this vulnerability only allows modification of file attributes; file contents cannot be read or altered through this attack vector. If the SSH daemon runs as root, this enables direct privilege escalation: an attacker can set the setuid bit on any binary, change ownership of sensitive files, or make system configuration world-writable. This vulnerability is associated with program files lib/ssh/src/ssh_sftpd.erl and program routines ssh_sftpd:do_open/4 and ssh_sftpd:handle_op/4. This issue affects OTP from OTP 17.0 until OTP 28.4.3, 27.3.4.11, and 26.2.5.20 corresponding to ssh from 3.01 until 5.5.3, 5.2.11.7, and 5.1.4.15.
Title SFTP chroot bypass via path traversal in SSH_FXP_FSETSTAT
First Time appeared Erlang
Erlang erlang\/otp
Weaknesses CWE-22
CPEs cpe:2.3:a:erlang:erlang\/otp:*:*:*:*:*:*:*:*
Vendors & Products Erlang
Erlang erlang\/otp
References
Metrics cvssV4_0

{'score': 5.3, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:L/VA:N/SC:N/SI:L/SA:N'}


Subscriptions

Erlang Erlang\/otp Erlang\/ssh Otp
cve-icon MITRE

Status: PUBLISHED

Assigner: EEF

Published:

Updated: 2026-07-24T14:14:17.633Z

Reserved: 2026-03-10T22:37:29.213Z

Link: CVE-2026-32147

cve-icon Vulnrichment

Updated: 2026-04-21T13:11:15.174Z

cve-icon NVD

Status : Modified

Published: 2026-04-21T12:15:58.800

Modified: 2026-07-24T15:17:16.337

Link: CVE-2026-32147

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-03T08:00:04Z

Weaknesses
  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')