CVE-2026-23942
CVE-2026-23942 · SFTP root escape via component-agnostic prefix check in ssh_sftpd
This page contains facts from public vulnerability sources. Check the original advisory before updating.
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 28.4.1, OTP 27.3.4.9 and OTP 26.2.5.18, corresponding to ssh from 3.0.1 before 5.5.1, 5.2.11.6 and 5.1.4.14.
CVSS 5.3 · Medium · EPSS 0.4% · Fix available
- Published
- Updated
Stack: system
Affected products and versions
erlang
- Versions
- ≥ 3.0.1: Affected; ≥ 5.5.1: Not affected; ≥ 5.2.11.6: Not affected; ≥ 5.1.4.14: Not affected (otp)
Update to 5.1.4.14
erlang
- Versions
- ≥ 17.0: Affected; ≥ 28.4.1: Not affected; ≥ 27.3.4.9: Not affected; ≥ 26.2.5.18: Not affected (otp)
- ≥ 84adefa331c4159d432d22840663c38f155cd4c1: Affected; ≥ 27688a824f753d4c16371dc70e88753fb410590b: Not affected; ≥ 9e0ac85d3485e7898e0da88a14be0ee2310a3b28: Not affected; ≥ 5ed603a1211b83b8be2d1fc06d3f3bf30c3c9759: Not affected (git)
Update to 26.2.5.18
erlang Debian:12
- Versions
- 1:25.2.3+dfsg-1
- 1:25.2.3+dfsg-1+deb12u1
- 1:25.2.3+dfsg-1+deb12u2
- 1:25.2.3+dfsg-1+deb12u3
- Affected ranges
- ECOSYSTEM: < 1:25.2.3+dfsg-1+deb12u4
Update to 1:25.2.3+dfsg-1+deb12u4
erlang Debian:13
- Versions
- 1:27.3.4.1+dfsg-1
- 1:27.3.4.1+dfsg-1+deb13u1
- Affected ranges
- ECOSYSTEM: < 1:27.3.4.1+dfsg-1+deb13u2
Update to 1:27.3.4.1+dfsg-1+deb13u2
erlang Debian:14
- Versions
- 1:27.3.4.1+dfsg-1
- 1:27.3.4.3+dfsg-1
- 1:27.3.4.4+dfsg-1
- 1:27.3.4.6+dfsg-1
- 1:27.3.4.8+dfsg-1
- Affected ranges
- ECOSYSTEM: < 1:27.3.4.9+dfsg-1
Update to 1:27.3.4.9+dfsg-1
erlang Ubuntu:Pro:14.04:LTS
- Versions
- 1:16.b.1-dfsg-4ubuntu1
- 1:16.b.2-dfsg-1ubuntu1
- 1:16.b.2-dfsg-2ubuntu1
- 1:16.b.3-dfsg-1ubuntu1
- 1:16.b.3-dfsg-1ubuntu2
- 1:16.b.3-dfsg-1ubuntu2.1
- 1:16.b.3-dfsg-1ubuntu2.2
- 1:16.b.3-dfsg-1ubuntu2.2+esm1
- 1:16.b.3-dfsg-1ubuntu2.2+esm2
- Affected ranges
- ECOSYSTEM: < 1:16.b.3-dfsg-1ubuntu2.2+esm3
Update to 1:16.b.3-dfsg-1ubuntu2.2+esm3
erlang Ubuntu:Pro:16.04:LTS
- Versions
- 1:18.0-dfsg-1ubuntu1
- 1:18.0-dfsg-1ubuntu2
- 1:18.2-dfsg-2ubuntu1
- 1:18.3-dfsg-1ubuntu1
- 1:18.3-dfsg-1ubuntu2
- 1:18.3-dfsg-1ubuntu3
- 1:18.3-dfsg-1ubuntu3.1
- 1:18.3-dfsg-1ubuntu3.1+esm1
- 1:18.3-dfsg-1ubuntu3.1+esm2
- 1:18.3-dfsg-1ubuntu3.1+esm3
- Affected ranges
- ECOSYSTEM: < 1:18.3-dfsg-1ubuntu3.1+esm4
Update to 1:18.3-dfsg-1ubuntu3.1+esm4
erlang Ubuntu:Pro:18.04:LTS
- Versions
- 1:20.0.4+dfsg-1ubuntu1
- 1:20.1.2+dfsg-1ubuntu1
- 1:20.1.3+dfsg-1ubuntu1
- 1:20.1.4+dfsg-1ubuntu1
- 1:20.1.5+dfsg-1ubuntu1
- 1:20.1.6+dfsg-1ubuntu1
- 1:20.1.7+dfsg-1ubuntu1
- 1:20.2.1+dfsg-1ubuntu1
- 1:20.2.2+dfsg-1ubuntu1
- 1:20.2.2+dfsg-1ubuntu2
- 1:20.2.2+dfsg-1ubuntu2+esm1
- 1:20.2.2+dfsg-1ubuntu2+esm2
- 1:20.2.2+dfsg-1ubuntu2+esm3
- Affected ranges
- ECOSYSTEM: < 1:20.2.2+dfsg-1ubuntu2+esm4
Update to 1:20.2.2+dfsg-1ubuntu2+esm4
erlang Ubuntu:Pro:20.04:LTS
- Versions
- 1:22.0.7+dfsg-1build1
- 1:22.2+dfsg-1
- 1:22.2.1+dfsg-1
- 1:22.2.2+dfsg-1
- 1:22.2.3+dfsg-1
- 1:22.2.3+dfsg-2
- 1:22.2.4+dfsg-1
- 1:22.2.7+dfsg-1
- 1:22.2.7+dfsg-1ubuntu0.2
- 1:22.2.7+dfsg-1ubuntu0.3
- 1:22.2.7+dfsg-1ubuntu0.4
- 1:22.2.7+dfsg-1ubuntu0.5
- 1:22.2.7+dfsg-1ubuntu0.5+esm1
- 1:22.2.7+dfsg-1ubuntu0.5+esm2
- Affected ranges
- ECOSYSTEM: < 1:22.2.7+dfsg-1ubuntu0.5+esm3
Update to 1:22.2.7+dfsg-1ubuntu0.5+esm3
erlang Ubuntu:22.04:LTS
- Versions
- 1:23.2.6+dfsg-1build1
- 1:24.1.1+dfsg-1
- 1:24.1.4+dfsg-1
- 1:24.1.5+dfsg-1
- 1:24.1.5+dfsg-1ubuntu1
- 1:24.2+dfsg-1
- 1:24.2.1+dfsg-1
- 1:24.2.1+dfsg-1ubuntu0.1
- 1:24.2.1+dfsg-1ubuntu0.2
- 1:24.2.1+dfsg-1ubuntu0.3
- 1:24.2.1+dfsg-1ubuntu0.4
- 1:24.2.1+dfsg-1ubuntu0.5
- 1:24.2.1+dfsg-1ubuntu0.6
- 1:24.2.1+dfsg-1ubuntu0.7
- Affected ranges
- ECOSYSTEM: < 1:24.2.1+dfsg-1ubuntu0.8
Update to 1:24.2.1+dfsg-1ubuntu0.8
erlang Ubuntu:24.04:LTS
- Versions
- 1:25.2.3+dfsg-1
- 1:25.3.2.8+dfsg-1
- 1:25.3.2.8+dfsg-1ubuntu1
- 1:25.3.2.8+dfsg-1ubuntu3
- 1:25.3.2.8+dfsg-1ubuntu4
- 1:25.3.2.8+dfsg-1ubuntu4.1
- 1:25.3.2.8+dfsg-1ubuntu4.2
- 1:25.3.2.8+dfsg-1ubuntu4.3
- 1:25.3.2.8+dfsg-1ubuntu4.4
- 1:25.3.2.8+dfsg-1ubuntu4.5
- 1:25.3.2.8+dfsg-1ubuntu4.6
- 1:25.3.2.8+dfsg-1ubuntu4.7
- Affected ranges
- ECOSYSTEM: < 1:25.3.2.8+dfsg-1ubuntu4.8
Update to 1:25.3.2.8+dfsg-1ubuntu4.8
erlang Ubuntu:25.10
- Versions
- 1:27.3+dfsg-1ubuntu1
- 1:27.3+dfsg-1ubuntu1.1
- 1:27.3.4.1+dfsg-1
- 1:27.3.4.1+dfsg-1build1
- 1:27.3.4.1+dfsg-1ubuntu0.1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
erlang Ubuntu:26.04:LTS
- Versions
- 1:27.3.4.1+dfsg-1build1
- 1:27.3.4.3+dfsg-1
- 1:27.3.4.4+dfsg-1
- 1:27.3.4.6+dfsg-1
- 1:27.3.4.6+dfsg-1ubuntu0.1
- Affected ranges
- ECOSYSTEM: < 1:27.3.4.6+dfsg-1ubuntu0.2
Update to 1:27.3.4.6+dfsg-1ubuntu0.2
Original sources
- https://github.com/erlang/otp/security/advisories/GHSA-4749-w85x-hw9h
- https://cna.erlef.org/cves/CVE-2026-23942.html
- https://osv.dev/vulnerability/EEF-CVE-2026-23942
- https://www.erlang.org/doc/system/versions.html#order-of-versions
- https://github.com/erlang/otp/commit/27688a824f753d4c16371dc70e88753fb410590b
- https://github.com/erlang/otp/commit/9e0ac85d3485e7898e0da88a14be0ee2310a3b28
- https://github.com/erlang/otp/commit/5ed603a1211b83b8be2d1fc06d3f3bf30c3c9759
- https://nvd.nist.gov/vuln/detail/CVE-2026-23942