Public vulnerability disclosure

CVE-2026-23942

SFTP root escape via component-agnostic prefix check in ssh_sftpd

publishedCWE-22

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.

Technical severity5.3 mediumCVSS 4.0 · CNA: EEF
Published2026-03-13Source updated 2026-11-11
Collected2026-11-112 attributed sources

Fixes and workarounds

Workaround

* 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: CNA: EEF

Fix

The reporting source identifies this reference as a patch. Check the advisory for affected versions and supported release branches.

Source: CNA: EEF

Fix

The reporting source identifies this reference as a patch. Check the advisory for affected versions and supported release branches.

Source: CNA: EEF

Fix

The reporting source identifies this reference as a patch. Check the advisory for affected versions and supported release branches.

Source: CNA: EEF

Affected products and versions

Affected products, source version ranges and reporting authorities
ProductVersionsAuthority
OTP
Erlang
otp
software-id
≥ 17.0; < * (affected, otp); unaffected at 26.2.5.18; unaffected at 27.3.4.9; unaffected at 28.4.1
Other versions: unknown
CNA: EEF
OTP
Erlang
ssh
otp
≥ 3.0.1; < * (affected, otp); unaffected at 5.1.4.14; unaffected at 5.2.11.6; unaffected at 5.5.1
Other versions: unknown
CNA: EEF
OTP
Erlang
erlang/otp
github
≥ 84adefa331c4159d432d22840663c38f155cd4c1; < * (affected, git); unaffected at 5ed603a1211b83b8be2d1fc06d3f3bf30c3c9759; unaffected at 9e0ac85d3485e7898e0da88a14be0ee2310a3b28; unaffected at 27688a824f753d4c16371dc70e88753fb410590b
≥ 5ed603a1211b83b8be2d1fc06d3f3bf30c3c9759; < * (unaffected, git)
≥ 9e0ac85d3485e7898e0da88a14be0ee2310a3b28; < * (unaffected, git)
≥ 27688a824f753d4c16371dc70e88753fb410590b; < * (unaffected, git)
Other versions: unknown
CNA: EEF

Version ranges are source assertions. Check the vendor advisory and your installed configuration before determining exposure.

CVSS assessments

CVSS scores, vectors and reporting authorities
Version / scoreVectorAuthority
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:NCNA: EEF

Exploit evidence

No exploit evidence in collected sources. This is not proof of no exploitation.

References

For agents and automation

Read public disclosures for free as Markdown or JSON. Compatible browsers also expose native WebMCP tools to search disclosures, read this page, and discover API access.

Use the ontology-linked Cyber API with x402 pay per request, or a Y2 Pro or Elite API key with the intel:cyber scope.

Endpoints and access details

https://api.y2.dev/api/v2/cyber/cves
https://api.y2.dev/api/v2/cyber/cves/{cveId}

A workspace owner or admin can create a Pro or Elite API key. Send Authorization: Bearer <Y2_API_KEY> from your trusted agent runtime.

For x402, omit Authorization and read the HTTP 402 payment challenge before signing a retry. Public browser tools do not make payments.

Agent access JSON · OpenAPI · CVE API guide