CVE-2026-32147: CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in Erlang OTP
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.
AI Analysis
Technical Summary
This vulnerability in Erlang OTP's ssh_sftpd module (CVE-2026-32147) arises from improper limitation of pathname to a restricted directory (CWE-22). The SFTP daemon stores raw user-supplied paths in file handles rather than chroot-resolved paths, allowing authenticated SFTP users to issue SSH_FXP_FSETSTAT commands that modify file attributes outside the intended chroot boundary. The attack requires the target file to exist at the same relative path on the real filesystem. The vulnerability affects OTP versions from 17.0 before OTP 28.4.3, 27.3.4.11, and 26.2.5.20, and corresponding ssh versions 3.0.1 before 5.5.3, 5.2.11.7, and 5.1.4.15. If the SSH daemon runs with root privileges, this can lead to privilege escalation by changing ownership or permissions of critical files.
Potential Impact
An authenticated SFTP user can bypass the chroot directory restriction to modify file attributes (permissions, ownership, timestamps) on files outside the restricted directory. This does not allow reading or modifying file contents but can lead to privilege escalation if the SSH daemon runs as root. Attackers could set the setuid bit on binaries, change ownership of sensitive files, or make system configuration files world-writable, potentially compromising system security.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, administrators should consider restricting SSH daemon privileges and carefully review chroot configurations. Monitoring and restricting authenticated SFTP user actions may help mitigate risk. Avoid running the SSH daemon as root if possible.
CVE-2026-32147: CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in Erlang OTP
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.
CVSS v4.0
Score 5.3medium
Affected software
pkg:github/erlang/otpRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
This vulnerability in Erlang OTP's ssh_sftpd module (CVE-2026-32147) arises from improper limitation of pathname to a restricted directory (CWE-22). The SFTP daemon stores raw user-supplied paths in file handles rather than chroot-resolved paths, allowing authenticated SFTP users to issue SSH_FXP_FSETSTAT commands that modify file attributes outside the intended chroot boundary. The attack requires the target file to exist at the same relative path on the real filesystem. The vulnerability affects OTP versions from 17.0 before OTP 28.4.3, 27.3.4.11, and 26.2.5.20, and corresponding ssh versions 3.0.1 before 5.5.3, 5.2.11.7, and 5.1.4.15. If the SSH daemon runs with root privileges, this can lead to privilege escalation by changing ownership or permissions of critical files.
Potential Impact
An authenticated SFTP user can bypass the chroot directory restriction to modify file attributes (permissions, ownership, timestamps) on files outside the restricted directory. This does not allow reading or modifying file contents but can lead to privilege escalation if the SSH daemon runs as root. Attackers could set the setuid bit on binaries, change ownership of sensitive files, or make system configuration files world-writable, potentially compromising system security.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, administrators should consider restricting SSH daemon privileges and carefully review chroot configurations. Monitoring and restricting authenticated SFTP user actions may help mitigate risk. Avoid running the SSH daemon as root if possible.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- EEF
- Date Reserved
- 2026-03-10T22:37:29.213Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 69e76a9219fe3cd2cdcd3204
Added to database: 04/21/2026, 12:16:18 UTC
Last enriched: 07/24/2026, 21:34:24 UTC
Last updated: 07/31/2026, 19:22:58 UTC
Views: 138
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.