CVE-2026-54886: SSH SFTP server denial of service via extended channel data infinite loop
Loop with Unreachable Exit Condition ('Infinite Loop') vulnerability in Erlang OTP ssh (sshsftpd module) allows an authenticated SFTP user to render an SFTP channel permanently unresponsive.
The handledata/4 function in sshsftpd contains a catch-all clause that accepts channel data of any type. When channel data with a non-zero type code (SSHMSGCHANNELEXTENDEDDATA) 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.
The 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 SSHMSGCHANNELEXTENDEDDATA with any datatypecode and any non-empty payload at or below the size limit.
The targeted sshsftpd 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.
Erlang/OTP SSH configurations using the default maxchannels setting (infinity) allow an authenticated user to open unlimited channels per connection, amplifying the attack without requiring multiple TCP connections or authentications.
No 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.
This vulnerability is associated with program file lib/ssh/src/sshsftpd.erl and program routine sshsftpd:handledata/4.
This issue affects OTP from OTP 17.0 before OTP 29.0.3, OTP 28.5.0.3 and OTP 27.3.4.14, corresponding to ssh from 3.0.1 before 6.0.2, 5.5.2.2 and 5.2.11.9.
Other sources
Loop with Unreachable Exit Condition ('Infinite Loop') vulnerability in Erlang OTP ssh (sshsftpd module) allows an authenticated SFTP user to render an SFTP channel permanently unresponsive.
The handledata/4 function in sshsftpd contains a catch-all clause that accepts channel data of any type. When channel data with a non-zero type code (SSHMSGCHANNELEXTENDEDDATA) 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.
The 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 SSHMSGCHANNELEXTENDEDDATA with any datatypecode and any non-empty payload at or below the size limit.
The targeted sshsftpd 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.
Erlang/OTP SSH configurations using the default maxchannels setting (infinity) allow an authenticated user to open unlimited channels per connection, amplifying the attack without requiring multiple TCP connections or authentications.
No 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.
This vulnerability is associated with program file lib/ssh/src/sshsftpd.erl and program routine sshsftpd:handledata/4.
This 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.
— NVD
SSH SFTP server denial of service via extended channel data infinite loop
— Microsoft
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 26.2.5.21-3 - Upgrade
Upgrade
Erlang/OTP ssh (ssh_sftpd module / lib/ssh/src/ssh_sftpd.erl)to a version that resolves this vulnerability.Fixed in 29.0.3 - Upgrade
Upgrade
Erlang/OTP ssh (ssh_sftpd module / lib/ssh/src/ssh_sftpd.erl)to a version that resolves this vulnerability.Fixed in 28.5.0.3 - Upgrade
Upgrade
Erlang/OTP ssh (ssh_sftpd module / lib/ssh/src/ssh_sftpd.erl)to a version that resolves this vulnerability.Fixed in 27.3.4.14 - Upgrade
Upgrade
Erlang/OTP sshto a version that resolves this vulnerability.Fixed in 6.0.2 - Upgrade
Upgrade
Erlang/OTP sshto a version that resolves this vulnerability.Fixed in 5.5.2.2 - Upgrade
Upgrade
Erlang/OTP sshto a version that resolves this vulnerability.Fixed in 5.2.11.9 - Configuration
Avoid the default max_channels setting of infinity; set max_channels to a finite limit so authenticated users cannot open unlimited SSH channels per connection (amplifies CPU/memory impact of the SFTP DoS loop).
Erlang/OTP SSH server max_channels = (not infinity) - Compensating control
Mitigate by restricting SFTP/SSH access so unauthenticated users cannot reach the affected ssh_sftpd channel; the issue is triggered by an authenticated SFTP user sending SSH_MSG_CHANNEL_EXTENDED_DATA on an open channel.
Event History
Frequently Asked Questions
What is the severity of CVE-2026-54886?
CVE-2026-54886 has a risk score of 32, indicating a moderate severity level.
How do I fix CVE-2026-54886?
To mitigate CVE-2026-54886, it is recommended to update to the latest version of Erlang/OTP that includes a patch for the vulnerability.
What components are affected by CVE-2026-54886?
CVE-2026-54886 affects the ssh_sftpd module in the Erlang/OTP SSH implementation.
What type of attack does CVE-2026-54886 facilitate?
CVE-2026-54886 allows an authenticated SFTP user to exploit the vulnerability to create a denial of service condition.
Is authentication required to exploit CVE-2026-54886?
Yes, an attacker must be an authenticated SFTP user to exploit the infinite loop vulnerability in CVE-2026-54886.