CVE-2026-23942: CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in Erlang OTP
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.
AI Analysis
Technical Summary
The vulnerability in Erlang OTP's ssh_sftpd module (specifically in ssh_sftpd:is_within_root/2) is due to improper limitation of a pathname to a restricted directory (CWE-22). The SFTP server incorrectly uses string prefix matching (lists:prefix/2) to verify if a requested path is within the configured root directory, rather than validating path components properly. This flaw allows authenticated users to access directories outside the intended root if those directories have names sharing a prefix with the root directory path. The issue affects OTP versions from 17.0 before 28.4.1, 27.3.4.9, and 26.2.5.18, and ssh versions from 3.0.1 before 5.5.1, 5.2.11.6, and 5.1.4.14.
Potential Impact
Authenticated users can exploit this vulnerability to access sibling directories outside the intended root directory if those directories share a common prefix with the root path. This could lead to unauthorized access to files and directories that should be restricted, potentially exposing sensitive data.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. No official patch or fix information is provided in the available data. Until a fix is available, restrict access to the SFTP server to trusted users only and monitor for unusual access patterns related to directory traversal attempts.
CVE-2026-23942: CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in Erlang OTP
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.
CVSS v4.0
Score 5.3medium
Affected software
pkg:github/erlang/otpRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in Erlang OTP's ssh_sftpd module (specifically in ssh_sftpd:is_within_root/2) is due to improper limitation of a pathname to a restricted directory (CWE-22). The SFTP server incorrectly uses string prefix matching (lists:prefix/2) to verify if a requested path is within the configured root directory, rather than validating path components properly. This flaw allows authenticated users to access directories outside the intended root if those directories have names sharing a prefix with the root directory path. The issue affects OTP versions from 17.0 before 28.4.1, 27.3.4.9, and 26.2.5.18, and ssh versions from 3.0.1 before 5.5.1, 5.2.11.6, and 5.1.4.14.
Potential Impact
Authenticated users can exploit this vulnerability to access sibling directories outside the intended root directory if those directories share a common prefix with the root path. This could lead to unauthorized access to files and directories that should be restricted, potentially exposing sensitive data.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. No official patch or fix information is provided in the available data. Until a fix is available, restrict access to the SFTP server to trusted users only and monitor for unusual access patterns related to directory traversal attempts.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- EEF
- Date Reserved
- 2026-01-19T14:23:14.343Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 69b3d90e2f860ef943bac728
Added to database: 03/13/2026, 09:29:50 UTC
Last enriched: 07/24/2026, 21:33:19 UTC
Last updated: 07/31/2026, 19:22:58 UTC
Views: 162
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.