CVE-2026-23942 SFTP root escape via component-agnostic prefix check in ssh_sftpd
Authenticated users can escape SFTP root directories via prefix matching flaws, accessing sibling directories in Erlang OTP.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-23942?
CVE-2026-23942 is a medium-severity path traversal vulnerability in Erlang OTP, published on 13 Mar 2026. Any signed-in user can exploit it over the network, with no action from the victim.
Official 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 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.
Weakness: CWE-22
Which versions are affected by CVE-2026-23942?
It affects 2 products.
Products include Erlang Erlang\/Otp, Erlang Erlang\/Ssh.
How do I fix CVE-2026-23942?
Upgrade to a fixed version.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2026-23942 being exploited?
There is no known exploitation of CVE-2026-23942 in the wild and no public exploit code.
Other vulnerabilities in Erlang OTP
- CVE-2022-37026 Auth bypass in n/a
- CVE-2016-10253 Memory corruption in n/a
- CVE-2026-55953 TLS 1.2 and DTLS client accepts unoffered anonymous cipher suite, bypassing server authentication
- CVE-2026-49759 Stack buffer overflow in SCTP error cause parsing in inet_drv allows remote VM crash
- CVE-2026-58227 TLS/DTLS denial of service via unbounded recursion on cross-signed peer certificate chain
Sources
Also known as AZL-79874, DEBIAN-CVE-2026-23942, EEF-CVE-2026-23942, GHSA-4749-w85x-hw9h, UBUNTU-CVE-2026-23942.