CVE-2026-23942

medium
Published 2026-03-13 · Modified 2026-05-21
CVSS v3
5.4
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
CVSS v4 NEW
5.3
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
VIR risk
5.4

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 until OTP 28.4.1, OTP 27.3.4.9 and OTP 26.2.5.18, corresponding to ssh from 3.0.1 until 5.5.1, 5.2.11.6 and 5.1.4.14.

Predictions

Exploit likelihood
64%
Patch ETA

Heuristic predictions, AS-IS, for prioritization only.

Mitigations

Mitigation details

Source: OSV.dev · View original ↗ · CC-BY-4.0

<h3>CVE-2026-23942</h3> 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…

<h3>CVE-2026-23942</h3>

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 until OTP 28.4.1, OTP 27.3.4.9 and OTP 26.2.5.18, corresponding to ssh from 3.0.1 until 5.5.1, 5.2.11.6 and 5.1.4.14.

Affected

VendorProductVersion
OTP-17.0, OTP-18.0, OTP-18.0-rc1, OTP-19.0, OTP-19.0-rc1, OTP-19.0-rc2, OTP-20.0, OTP-20.0-rc1, OTP-20.0-rc2, OTP-21.0, OTP-21.0-rc1, OTP-21.0-rc2, OTP-22.0, OTP-22.0-rc1, OTP-22.0-rc2, OTP-22.0-rc3,

OS impact

OSVersionStatusFixed in
debian debianbookwormfixed1:25.2.3+dfsg-1+deb12u4
debian debianbullseyefixed1:23.2.6+dfsg-1+deb11u4
debian debianforkyfixed1:27.3.4.9+dfsg-1
debian debiansidfixed1:27.3.4.9+dfsg-1
debian debiantrixiefixed1:27.3.4.1+dfsg-1+deb13u2
suse slesaffected

Application impact

VendorProductVersionsFixed
erlangerlang\/otp{"startIncluding":"17.0","endExcluding":"26.2.5.18"}26.2.5.18
erlangerlang\/ssh{"startIncluding":"3.0.1","endExcluding":"5.1.4.14"}5.1.4.14

References

CWEs

CWE-22

Community-verified mitigations for this CVE will appear above when contributors publish them.

Verify integrity in audit chain (admin only). AS-IS.