{"id":"CVE-2026-32147","aliases":["CVE-2026-32147","EEF-CVE-2026-32147","GHSA-28jg-mw9x-hpm5"],"related":[],"kind":"vulnerability","state":"published","title":"SFTP chroot bypass via path traversal in SSH_FXP_FSETSTAT","summary":"Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') vulnerability in Erlang OTP ssh (ssh_sftpd module) allows an authenticated SFTP user to modify file attributes outside the configured chroot directory.\n\nThe SFTP daemon (ssh_sftpd) stores the raw, user-supplied path in file handles instead of the chroot-resolved path. When SSH_FXP_FSETSTAT is issued on such a handle, file attributes (permissions, ownership, timestamps) are modified on the real filesystem path, bypassing the root directory boundary entirely.\n\nAny authenticated SFTP user on a server configured with the root option can modify file attributes of files outside the intended chroot boundary. The prerequisite is that a target file must exist on the real filesystem at the same relative path. Note that this vulnerability only allows modification of file attributes; file contents cannot be read or altered through this attack vector.\n\nIf the SSH daemon runs as root, this enables direct privilege escalation: an attacker can set the setuid bit on any binary, change ownership of sensitive files, or make system configuration world-writable.\n\nThis vulnerability is associated with program files lib/ssh/src/ssh_sftpd.erl and program routines ssh_sftpd:do_open/4 and ssh_sftpd:handle_op/4.\n\nThis issue affects OTP from OTP 17.0 before OTP 26.2.5.20, OTP 27.3.4.11, and OTP 28.4.3, corresponding to ssh from 3.0.1 before 5.1.4.15, 5.2.11.7, and 5.5.2. Whether OTP before OTP 17.0, corresponding to ssh before 3.0.1, is affected is unknown.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') vulnerability in Erlang OTP ssh (ssh_sftpd module) allows an authenticated SFTP user to modify file attributes outside the configured chroot directory.\n\nThe SFTP daemon (ssh_sftpd) stores the raw, user-supplied path in file handles instead of the chroot-resolved path. When SSH_FXP_FSETSTAT is issued on such a handle, file attributes (permissions, ownership, timestamps) are modified on the real filesystem path, bypassing the root directory boundary entirely.\n\nAny authenticated SFTP user on a server configured with the root option can modify file attributes of files outside the intended chroot boundary. The prerequisite is that a target file must exist on the real filesystem at the same relative path. Note that this vulnerability only allows modification of file attributes; file contents cannot be read or altered through this attack vector.\n\nIf the SSH daemon runs as root, this enables direct privilege escalation: an attacker can set the setuid bit on any binary, change ownership of sensitive files, or make system configuration world-writable.\n\nThis vulnerability is associated with program files lib/ssh/src/ssh_sftpd.erl and program routines ssh_sftpd:do_open/4 and ssh_sftpd:handle_op/4.\n\nThis issue affects OTP from OTP 17.0 before OTP 26.2.5.20, OTP 27.3.4.11, and OTP 28.4.3, corresponding to ssh from 3.0.1 before 5.1.4.15, 5.2.11.7, and 5.5.2. Whether OTP before OTP 17.0, corresponding to ssh before 3.0.1, is affected is unknown.","source":"cvelist"},{"lang":"en","text":"## Summary\n\nImproper Limitation of a Pathname to a Restricted Directory ('Path Traversal') vulnerability in Erlang OTP `ssh` (`ssh_sftpd` module) allows an authenticated SFTP user to modify file attributes outside the configured chroot directory.\n\nThe SFTP daemon (`ssh_sftpd`) stores the raw, user-supplied path in file handles instead of the chroot-resolved path. When `SSH_FXP_FSETSTAT` is issued on such a handle, file attributes (permissions, ownership, timestamps) are modified on the real filesystem path, bypassing the root directory boundary entirely.\n\nAny authenticated SFTP user on a server configured with the `root` option can modify file attributes of files outside the intended chroot boundary. The prerequisite is that a target file must exist on the real filesystem at the same relative path. Note that this vulnerability only allows modification of file attributes; file contents cannot be read or altered through this attack vector.\n\nIf the SSH daemon runs as `root`, this enables direct privilege escalation: an attacker can set the setuid bit on any binary, change ownership of sensitive files, or make system configuration world-writable.\n\nThis vulnerability is associated with program files `lib/ssh/src/ssh_sftpd.erl` and program routines `ssh_sftpd:do_open/4` and `ssh_sftpd:handle_op/4`.\n\nThis issue affects OTP from OTP 17.0 before OTP 26.2.5.20, OTP 27.3.4.11, and OTP 28.4.3, corresponding to ssh from 3.0.1 before 5.1.4.15, 5.2.11.7, and 5.5.2. Whether OTP before OTP 17.0, corresponding to ssh before 3.0.1, is affected is unknown.\n\n## Workarounds\n\n* Do not use the `root` option in `ssh_sftpd:subsystem_spec/1`, and instead rely on OS-level chroot or container isolation to confine SFTP users.\n* Ensure the Erlang VM is not running as a privileged OS user. Running the VM as an unprivileged user limits the impact of this vulnerability, since attribute modifications are constrained by that user's OS-level permissions.\n\n## Configurations\n\nThe SFTP subsystem must be configured with the `root` option in `ssh_sftpd:subsystem_spec/1`. The `root` option is not set by default.","format":"markdown","source":"eef"},{"lang":"es","text":"Una vulnerabilidad de Limitación Incorrecta de un Nombre de Ruta a un Directorio Restringido (’Salto de Ruta’) en Erlang OTP ssh (módulo ssh_sftpd) permite a un usuario SFTP autenticado modificar atributos de archivo fuera del directorio chroot configurado.\n\nEl demonio SFTP (ssh_sftpd) almacena la ruta sin procesar, proporcionada por el usuario, en descriptores de archivo en lugar de la ruta resuelta por chroot. Cuando SSH_FXP_FSETSTAT se emite en dicho descriptor, los atributos de archivo (permisos, propiedad, marcas de tiempo) se modifican en la ruta real del sistema de archivos, eludiendo por completo el límite del directorio raíz.\n\nCualquier usuario SFTP autenticado en un servidor configurado con la opción root puede modificar atributos de archivo de archivos fuera del límite chroot previsto. El requisito previo es que un archivo de destino debe existir en el sistema de archivos real en la misma ruta relativa. Tenga en cuenta que esta vulnerabilidad solo permite la modificación de atributos de archivo; el contenido de los archivos no puede ser leído o alterado a través de este vector de ataque.\n\nSi el demonio SSH se ejecuta como root, esto permite una escalada de privilegios directa: un atacante puede establecer el bit setuid en cualquier binario, cambiar la propiedad de archivos sensibles o hacer que la configuración del sistema sea de escritura global.\n\nEsta vulnerabilidad está asociada con los archivos de programa lib/ssh/src/ssh_sftpd.erl y las rutinas de programa ssh_sftpd:do_open/4 y ssh_sftpd:handle_op/4.\n\nEste problema afecta a OTP desde OTP 17.0 hasta OTP 28.4.3, 27.3.4.11 y 26.2.5.20 correspondiente a ssh desde 3.01 hasta 5.5.3, 5.2.11.7 y 5.1.4.15.","source":"nvd"}],"published":"2026-04-21T12:01:20.350Z","modified":"2026-11-25T06:30:20.666Z","severity":{"scorer":"EEF","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:L/VA:N/SC:N/SI:L/SA:N","score":5.3,"rating":"MEDIUM"},"severities":[{"scorer":"EEF","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:L/VA:N/SC:N/SI:L/SA:N","score":5.3,"rating":"MEDIUM"},{"scorer":"Erlang Ecosystem Foundation","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:L/VA:N/SC:N/SI:L/SA:N"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N","score":4.3,"rating":"MEDIUM"}],"cwes":["CWE-22"],"affected":[{"ranges":[{"type":"otp","introduced":"3.0.1","fixed":"*","status":"affected"}],"vendor":"Erlang","product":"OTP","package":"ssh","cpe":"cpe:2.3:a:erlang:erlang\\/otp:*:*:*:*:*:*:*:*","repo":"https://github.com/erlang/otp","source":"cvelist"},{"ranges":[{"type":"otp","introduced":"17.0","fixed":"*","status":"affected"}],"vendor":"Erlang","product":"OTP","package":"otp","cpe":"cpe:2.3:a:erlang:erlang\\/otp:*:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"git","introduced":"07b8f441ca711f9812fad9e9115bab3c3aa92f79","fixed":"28c5d5a6c5f873dc701b597276271763e7d1c004","status":"affected"},{"type":"git","introduced":"28c5d5a6c5f873dc701b597276271763e7d1c004","fixed":"*","status":"unaffected"}],"vendor":"Erlang","product":"OTP","package":"erlang/otp","cpe":"cpe:2.3:a:erlang:erlang\\/otp:*:*:*:*:*:*:*:*","repo":"https://github.com/erlang/otp","source":"cvelist"},{"ranges":[{"type":"git","introduced":"07b8f441ca711f9812fad9e9115bab3c3aa92f79","status":"affected","fixed":"28c5d5a6c5f873dc701b597276271763e7d1c004"}],"repo":"https://github.com/erlang/otp","source":"eef"},{"ranges":[{"status":"affected","introduced":"17.0","fixed":"26.2.5.20"},{"status":"affected","introduced":"27.0","fixed":"27.3.4.11"},{"status":"affected","introduced":"28.0","fixed":"28.4.3"}],"vendor":"erlang","product":"erlang/otp","cpe":"cpe:2.3:a:erlang:erlang\\/otp:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","introduced":"3.0.1","fixed":"5.1.4.15"},{"status":"affected","introduced":"5.2","fixed":"5.2.11.7"},{"status":"affected","introduced":"5.5","fixed":"5.5.2"}],"vendor":"erlang","product":"erlang/ssh","cpe":"cpe:2.3:a:erlang:erlang\\/ssh:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/erlang/otp/security/advisories/GHSA-28jg-mw9x-hpm5","tags":["advisory","related","vendor-advisory"],"sources":["cvelist","eef","nvd"]},{"url":"https://cna.erlef.org/cves/CVE-2026-32147.html","tags":["related","vendor-advisory","web"],"sources":["cvelist","eef","nvd"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-32147","tags":["related","third-party-advisory"],"sources":["cvelist","nvd"]},{"url":"https://www.erlang.org/doc/system/versions.html#order-of-versions","tags":["product","web","x-version-scheme"],"sources":["cvelist","eef","nvd"]},{"url":"https://github.com/erlang/otp/commit/07b8f441ca711f9812fad9e9115bab3c3aa92f79","tags":["related","web"],"sources":["cvelist","eef","nvd"]},{"url":"https://github.com/erlang/otp/commit/28c5d5a6c5f873dc701b597276271763e7d1c004","tags":["fix","patch"],"sources":["cvelist","eef","nvd"]}],"credits":["John Downey","Michał Wąsowski","Jakub Witczak"],"assigner":"EEF","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-04-21T13:11:06.946Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-32147","url":"https://www.cve.org/CVERecord?id=CVE-2026-32147","licence":"CVE Terms of Use","modified":"2026-11-20T05:57:23.788Z"},{"source":"eef","name":"Erlang Ecosystem Foundation","id":"EEF-CVE-2026-32147","url":"https://osv.dev/vulnerability/EEF-CVE-2026-32147","licence":"CC-BY-4.0","modified":"2026-11-25T06:30:20.666Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-32147","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-32147","licence":"Public domain","modified":"2026-11-20T06:17:24.850Z"}],"updatedAt":"2026-11-25T22:59:19.090Z","epss":{"score":0.00382,"percentile":0.34326,"date":"2026-12-02T12:00:21.000Z"}}