# CVE-2026-23942: SFTP root escape via component-agnostic prefix check in ssh_sftpd

- Severity: Medium 5.3 (CVSS:4.0, scored by EEF) `CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.41%, higher than 37% of CVEs (2026-12-01)
- Published: 2026-03-13T09:11:56.424Z
- Modified: 2026-11-25T06:30:20.351Z
- Also known as: EEF-CVE-2026-23942, GHSA-4749-w85x-hw9h
- Weaknesses: CWE-22
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial
- Assigned by: EEF

## 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.

(As written by CVE List.)

## Affected

- ssh: from 3.0.1 before *
- otp: from 17.0 before *
- erlang/otp: from 84adefa331c4159d432d22840663c38f155cd4c1 before * (not affected: from 27688a824f753d4c16371dc70e88753fb410590b before *; from 5ed603a1211b83b8be2d1fc06d3f3bf30c3c9759 before *; from 9e0ac85d3485e7898e0da88a14be0ee2310a3b28 before *)
- https://github.com/erlang/otp: from 84adefa331c4159d432d22840663c38f155cd4c1 before 27688a824f753d4c16371dc70e88753fb410590b; before 5ed603a1211b83b8be2d1fc06d3f3bf30c3c9759; before 9e0ac85d3485e7898e0da88a14be0ee2310a3b28
- erlang erlang/otp: from 17.0 before 26.2.5.18; from 27.0 before 27.3.4.9; from 28.0 before 28.4.1
- erlang erlang/ssh: from 3.0.1 before 5.1.4.14; from 5.2 before 5.2.11.6; from 5.5 up to 5.5.1

## Every score

- EEF: CVSS:4.0 5.3 Medium `CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N`
- Erlang Ecosystem Foundation: CVSS:4.0 `CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N`
- NVD: CVSS:3.1 5.4 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N`

## References

- <https://github.com/erlang/otp/security/advisories/GHSA-4749-w85x-hw9h> (advisory, mitigation, related, vendor-advisory)
- <https://cna.erlef.org/cves/CVE-2026-23942.html> (related, vendor-advisory, web)
- <https://osv.dev/vulnerability/EEF-CVE-2026-23942> (related, vendor-advisory)
- <https://www.erlang.org/doc/system/versions.html#order-of-versions> (product, web)
- <https://github.com/erlang/otp/commit/27688a824f753d4c16371dc70e88753fb410590b> (fix, patch)
- <https://github.com/erlang/otp/commit/5ed603a1211b83b8be2d1fc06d3f3bf30c3c9759> (fix, patch)
- <https://github.com/erlang/otp/commit/9e0ac85d3485e7898e0da88a14be0ee2310a3b28> (fix, patch)

## Sources

- CVE List: [CVE-2026-23942](https://www.cve.org/CVERecord?id=CVE-2026-23942), CVE Terms of Use, modified 2026-11-20
- Erlang Ecosystem Foundation: [EEF-CVE-2026-23942](https://osv.dev/vulnerability/EEF-CVE-2026-23942), CC-BY-4.0, modified 2026-11-25
- NVD: [CVE-2026-23942](https://nvd.nist.gov/vuln/detail/CVE-2026-23942), Public domain, modified 2026-11-20

---

Page: https://cve.day/CVE-2026-23942 · Whole record: https://cve.day/CVE-2026-23942.json · Rebuilt by cve.day 2026-11-25T22:59:15.871Z
