CVE-2026-23942

SFTP root escape via component-agnostic prefix check in ssh_sftpd

MEDIUM
5.4
CVSS Score
Published: March 13, 2026 at 09:11 AM UTC
Updated: July 24, 2026 at 03:33 PM UTC
2 products affected across 1 vendorErlang /otpErlang /ssh

Using OTP by Erlang?

Get instant alerts when new vulnerabilities affect OTP - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.4
Exploit prediction
EPSS 0.4%
SSVC
No known exploit

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v ≥ 17.0v ≥ 3.0.1v < 26.2.5.1817.0 ≤ v < 26.2.5.1827.0 ≤ v < 27.3.4.928.0 ≤ v < 28.4.117.03.0.184adefa331c4159d432d22840663c38f155cd4c1
Affected range stops below 26.2.5.18, so it looks safe — our inference, not a vendor statement
Affected range stops below 27.3.4.9, so it looks safe — our inference, not a vendor statement
Affected range stops below 28.4.1, so it looks safe — our inference, not a vendor statement
3.0.1 ≤ v < 5.1.4.145.2 ≤ v < 5.2.11.65.5 ≤ v ≤ 5.5.1
Affected range stops below 5.1.4.14, so it looks safe — our inference, not a vendor statement
Affected range stops below 5.2.11.6, so it looks safe — our inference, not a vendor statement

SSVC — Action Prioritization

SSVCNo known exploitAutomatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
NETWORK
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
LOW
Integrity
LOW
Availability
NONE
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-22

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card