CVE-2026-23942 SFTP root escape via component-agnostic prefix check in ssh_sftpd
- Published
- Updated
- Exploit status
- No public exploit known
Description
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') vulnerability in Erlang OTP (ssh_sftpd module) allows Path Traversal.
This vulnerability is associated with program files lib/ssh/src/ssh_sftpd.erl and program routines ssh_sftpd:is_within_root/2.
The SFTP server uses string prefix matching via lists:prefix/2 rather than proper path component validation when checking if a path is within the configured root directory. This allows authenticated users to access sibling directories that share a common name prefix with the configured root directory. For example, if root is set to /home/user1, paths like /home/user10 or /home/user1_backup would incorrectly be considered within the root.
This issue affects OTP from OTP 17.0 before OTP 26.2.5.18, OTP 27.3.4.9, and OTP 28.4.1, corresponding to ssh from 3.0.1 before 5.1.4.14, 5.2.11.6, and 5.5.1. Whether OTP before OTP 17.0, corresponding to ssh before 3.0.1, is affected is unknown.
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| cbl-mariner erlang(CBL-Mariner:2.0) | < 25.3.2.21-5 | 25.3.2.21-5 |
| azure linux erlang(Azure Linux:3.0) | < 26.2.5.18-1 | 26.2.5.18-1 |
| erlangotp | >= 17.0, < 26.2.5.18 | 26.2.5.18 |
| erlangotp | >= 3.0.1, < 5.1.4.14 | 5.1.4.14 |
| erlangotp | >= 84adefa331c4159d432d22840663c38f155cd4c1, < 5ed603a1211b83b8be2d1fc06d3f3bf30c3c9759 | 5ed603a1211b83b8be2d1fc06d3f3bf30c3c9759 |
| erlangotp | >= 27.0, < 27.3.4.9 | 27.3.4.9 |
| erlangotp | >= 28.0, < 28.4.1 | 28.4.1 |
| erlangssh | >= 3.0.1, < 5.1.4.14 | 5.1.4.14 |
| erlangssh | >= 5.2, < 5.2.11.6 | 5.2.11.6 |
| erlangssh | >= 5.5, <= 5.5.1 | No fix listed |
| debian/erlang(Debian:12) | < 1:25.2.3+dfsg-1+deb12u4 | 1:25.2.3+dfsg-1+deb12u4 |
| debian/erlang(Debian:12) | = 1:25.2.3+dfsg-1 | No fix listed |
| debian/erlang(Debian:12) | = 1:25.2.3+dfsg-1+deb12u1 | No fix listed |
| debian/erlang(Debian:12) | = 1:25.2.3+dfsg-1+deb12u2 | No fix listed |
| debian/erlang(Debian:12) | = 1:25.2.3+dfsg-1+deb12u3 | No fix listed |
| debian/erlang(Debian:13) | < 1:27.3.4.1+dfsg-1+deb13u2 | 1:27.3.4.1+dfsg-1+deb13u2 |
| debian/erlang(Debian:13) | = 1:27.3.4.1+dfsg-1 | No fix listed |
| debian/erlang(Debian:13) | = 1:27.3.4.1+dfsg-1+deb13u1 | No fix listed |
| debian/erlang(Debian:14) | < 1:27.3.4.9+dfsg-1 | 1:27.3.4.9+dfsg-1 |
| debian/erlang(Debian:14) | = 1:27.3.4.1+dfsg-1 | No fix listed |
| debian/erlang(Debian:14) | = 1:27.3.4.3+dfsg-1 | No fix listed |
| debian/erlang(Debian:14) | = 1:27.3.4.4+dfsg-1 | No fix listed |
| debian/erlang(Debian:14) | = 1:27.3.4.6+dfsg-1 | No fix listed |
| debian/erlang(Debian:14) | = 1:27.3.4.8+dfsg-1 | No fix listed |
| ubuntu/erlang(Ubuntu:22.04) | < 1:24.2.1+dfsg-1ubuntu0.8 | 1:24.2.1+dfsg-1ubuntu0.8 |
Show 2 more
| Product | Affected versions | Fixed in |
|---|---|---|
| ubuntu/erlang(Ubuntu:24.04) | < 1:25.3.2.8+dfsg-1ubuntu4.8 | 1:25.3.2.8+dfsg-1ubuntu4.8 |
| ubuntu/erlang(Ubuntu:26.04) | < 1:27.3.4.6+dfsg-1ubuntu0.2 | 1:27.3.4.6+dfsg-1ubuntu0.2 |
References
- MSRC Security Update Guide vendor-advisory
- CBL-Mariner Releases vendor-advisory
- SFTP root escape via component-agnostic prefix check in `ssh_sftpd` mitigation related vendor-advisory
- EEF CNA record for CVE-2026-23942 related vendor-advisory
- OSV record EEF-CVE-2026-23942 related vendor-advisory
- Erlang/OTP version ordering product
- Fix commit 27688a8 in erlang/otp patch
- Fix commit 9e0ac85 in erlang/otp patch
- Fix commit 5ed603a in erlang/otp patch
- Debian Security Tracker CVE-2026-23942 vendor-advisory
- Ubuntu CVE tracker vendor-advisory
- USN-8901-1 vendor-advisory
- www.cve.org
- bugs.debian.org issue-tracking