CVE-2026-23942
Medium 5.3No known exploitationFix availableSFTP root escape via component-agnostic prefix check in ssh_sftpd
Record last updated
CVSS score
Medium on a 0 to 10 scale
EPSS, chance of exploitation in 30 days
Higher than 36% of scored CVEs. A prediction, not evidence.
CISA remediation deadline
Not in the KEV catalog
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.
Weakness: CWE-22
Patching and mitigation
- Patch status
- Fix available (source: NVD (reference tagged Patch))
- Fix documented (source date)
- Mitigation
- * Use OS-level chroot to run the Erlang VM/SFTP server process in an isolated filesystem environment. * Ensure that no sensitive or precious data is readable or writable by the OS user running the Erlang VM. * Ensure that the SFTP server port is not reachable from untrusted machines. * Use directory naming conventions that avoid common prefixes (e.g., /home/users/alice/ instead of /home/user1/). Source (opens in a new tab)
- Vendor guidance
- github.com (opens in a new tab)
Affected products
| Vendor | Product | Affected versions | Fixed in | Per |
|---|---|---|---|---|
| Erlang | OTP | 17.0 | Not documented | CVE Program |
| Erlang | OTP | 3.0.1 | Not documented | CVE Program |
| Erlang | OTP | 84adefa331c4159d432d22840663c38f155cd4c1 | Not documented | CVE Program |
| erlang | erlang/otp | from 17.0 before 26.2.5.18 | 26.2.5.18 | NIST NVD |
| erlang | erlang/otp | from 27.0 before 27.3.4.9 | 27.3.4.9 | NIST NVD |
| erlang | erlang/otp | from 28.0 before 28.4.1 | 28.4.1 | NIST NVD |
| erlang | erlang/ssh | from 3.0.1 before 5.1.4.14 | 5.1.4.14 | NIST NVD |
| erlang | erlang/ssh | from 5.2 before 5.2.11.6 | 5.2.11.6 | NIST NVD |
| erlang | erlang/ssh | from 5.5 up to and including 5.5.1 | Not documented | NIST NVD |
| Erlang | OTP (unaffected) | 27688a824f753d4c16371dc70e88753fb410590b | Not documented | CVE Program |
| Erlang | OTP (unaffected) | 5ed603a1211b83b8be2d1fc06d3f3bf30c3c9759 | Not documented | CVE Program |
| Erlang | OTP (unaffected) | 9e0ac85d3485e7898e0da88a14be0ee2310a3b28 | Not documented | CVE Program |
Timeline
Disclosure
CVE record published by EEF
Source: CVE Program (opens in a new tab)
Patch
Fix documented by NVD (reference tagged Patch)
Vendor guidance and references
- Fix commit 27688a8 in erlang/otp (opens in a new tab)patch
- Fix commit 5ed603a in erlang/otp (opens in a new tab)patch
- Fix commit 9e0ac85 in erlang/otp (opens in a new tab)patch
- SFTP root escape via component-agnostic prefix check in `ssh_sftpd` (opens in a new tab)mitigation, related, vendor advisory, vendor-advisory
- EEF CNA record for CVE-2026-23942 (opens in a new tab)related, vendor advisory
- OSV record EEF-CVE-2026-23942 (opens in a new tab)related, vendor advisory
- Erlang/OTP version ordering (opens in a new tab)product, x_version-scheme