Skip to content
Threat Brief

← All advisories

CVE-2026-23942

Medium 5.3No known exploitationFix available

SFTP root escape via component-agnostic prefix check in ssh_sftpd

Record last updated

CVSS score

5.3

Medium on a 0 to 10 scale

EPSS, chance of exploitation in 30 days

0.4%

Higher than 36% of scored CVEs. A prediction, not evidence.

CISA remediation deadline

None

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

VendorProductAffected versionsFixed inPer
ErlangOTP17.0Not documentedCVE Program
ErlangOTP3.0.1Not documentedCVE Program
ErlangOTP84adefa331c4159d432d22840663c38f155cd4c1Not documentedCVE Program
erlangerlang/otpfrom 17.0 before 26.2.5.1826.2.5.18NIST NVD
erlangerlang/otpfrom 27.0 before 27.3.4.927.3.4.9NIST NVD
erlangerlang/otpfrom 28.0 before 28.4.128.4.1NIST NVD
erlangerlang/sshfrom 3.0.1 before 5.1.4.145.1.4.14NIST NVD
erlangerlang/sshfrom 5.2 before 5.2.11.65.2.11.6NIST NVD
erlangerlang/sshfrom 5.5 up to and including 5.5.1Not documentedNIST NVD
ErlangOTP (unaffected)27688a824f753d4c16371dc70e88753fb410590bNot documentedCVE Program
ErlangOTP (unaffected)5ed603a1211b83b8be2d1fc06d3f3bf30c3c9759Not documentedCVE Program
ErlangOTP (unaffected)9e0ac85d3485e7898e0da88a14be0ee2310a3b28Not documentedCVE Program

Timeline

  1. Disclosure

    CVE record published by EEF

    Source: CVE Program (opens in a new tab)

  2. Patch

    Fix documented by NVD (reference tagged Patch)

    Source: NVD (reference tagged Patch) (opens in a new tab)

Vendor guidance and references