{"affected":[{"ranges":[{"events":[{"introduced":"84adefa3318eef8631bf25cd233246a86eea18cd"},{"fixed":"eaf9550b8ad4738b81149d3f617102d980c6dd18"}],"repo":"https://github.com/erlang/otp","type":"GIT"}]}],"aliases":["GHSA-7wp4-pc27-2vj9","CVE-2026-54886"],"credits":[{"name":"Lukas Backström","type":"FINDER"},{"name":"Michał Wąsowski","type":"REMEDIATION_DEVELOPER"},{"name":"Jakub Witczak","type":"REMEDIATION_REVIEWER"}],"database_specific":{"capec_ids":["CAPEC-130"],"cpe_ids":["cpe:2.3:a:erlang:erlang\\/otp:*:*:*:*:*:*:*:*"],"cwe_ids":["CWE-835","CWE-400"]},"details":"## Summary\n\nLoop with Unreachable Exit Condition ('Infinite Loop') vulnerability in Erlang OTP ssh (ssh\\_sftpd module) allows an authenticated SFTP user to render an SFTP channel permanently unresponsive.\n\nThe handle\\_data/4 function in ssh\\_sftpd contains a catch-all clause that accepts channel data of any type. When channel data with a non-zero type code (SSH\\_MSG\\_CHANNEL\\_EXTENDED\\_DATA) arrives with an empty pending buffer and a payload at or below the SFTP packet size limit, the clause tail-calls itself with identical arguments, creating an infinite loop.\n\nThe SFTP protocol operates exclusively on normal channel data (type 0). Extended data (non-zero type) is meaningless for SFTP and is never sent by conforming clients. However, the SSH protocol permits any channel participant to send extended data on an open channel, so an authenticated SFTP client can trigger the loop by sending SSH\\_MSG\\_CHANNEL\\_EXTENDED\\_DATA with any data\\_type\\_code and any non-empty payload at or below the size limit.\n\nThe targeted ssh\\_sftpd process enters an infinite tail-recursive loop. It never processes another message, its message queue grows without bound, and it can only be stopped by killing the process. BEAM's reduction-based scheduler preemption continues to function, so other processes on the node are not starved, but each stuck channel process consumes its full CPU time share continuously and accumulates unbounded message queue memory. Opening many channels amplifies the CPU and memory impact.\n\nErlang/OTP SSH configurations using the default max\\_channels setting (infinity) allow an authenticated user to open unlimited channels per connection, amplifying the attack without requiring multiple TCP connections or authentications.\n\nNo file contents, credentials, or write access are obtainable through this issue. The impact is limited to denial of service on targeted SFTP channels, with secondary CPU degradation and memory growth.\n\nThis vulnerability is associated with program file lib/ssh/src/ssh\\_sftpd.erl and program routine ssh\\_sftpd:handle\\_data/4.\n\nThis issue affects OTP from OTP 17.0 until OTP 29.0.3, 28.5.0.3, and 27.3.4.14 corresponding to ssh from 3.0.1 until 6.0.2, 5.5.2.2, and 5.2.11.9.\n\n## Workaround\n\n\\* Set the max\\_channels daemon option to a finite value (e.g., {max\\_channels, 10}) to limit the number of channels an attacker can open per connection.\n\\* Set the max\\_sessions daemon option to limit total concurrent SSH connections to the daemon.\n\\* Use external process monitoring to detect and kill ssh\\_sftpd processes with abnormally high reduction counts and growing message queues.\n\\* Ensure that the SFTP server port is not reachable from untrusted machines.","id":"EEF-CVE-2026-54886","modified":"2026-07-02T16:06:20.502Z","published":"2026-07-02T16:06:20.502Z","references":[{"type":"ADVISORY","url":"https://github.com/erlang/otp/security/advisories/GHSA-7wp4-pc27-2vj9"},{"type":"WEB","url":"https://cna.erlef.org/cves/CVE-2026-54886.html"},{"type":"WEB","url":"https://www.erlang.org/doc/system/versions.html#order-of-versions"},{"type":"FIX","url":"https://github.com/erlang/otp/commit/eaf9550b8ad4738b81149d3f617102d980c6dd18"}],"related":[],"schema_version":"1.7.3","severity":[{"score":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N","type":"CVSS_V4"}],"summary":"SSH SFTP server denial of service via extended channel data infinite loop","upstream":[]}