Am I affected?

This record states its affected versions in a form that can't be compared automatically.

3.0.1 and up affected
5.5.1 not affected
5.2.11.6 not affected
5.1.4.14 not affected
every other version: unknown

Description

Improper Handling of Highly Compressed Data (Compression Bomb) vulnerability in Erlang OTP ssh (ssh_transport modules) allows Denial of Service via Resource Depletion.

The SSH transport layer advertises legacy zlib compression by default and inflates attacker-controlled payloads pre-authentication without any size limit, enabling reliable memory exhaustion DoS.

Two compression algorithms are affected:

  • zlib: Activates immediately after key exchange, enabling unauthenticated attacks
  • zlib@openssh.com: Activates post-authentication, enabling authenticated attacks

Each SSH packet can decompress ~255 MB from 256 KB of wire data (1029:1 amplification ratio). Multiple packets can rapidly exhaust available memory, causing OOM kills in memory-constrained environments.

This vulnerability is associated with program files lib/ssh/src/ssh_transport.erl and program routines ssh_transport:decompress/2, ssh_transport:handle_packet_part/4.

This issue affects OTP from OTP 17.0 before OTP 28.4.1, OTP 27.3.4.9 and OTP 26.2.5.18, corresponding to ssh from 3.0.1 before 5.5.1, 5.2.11.6 and 5.1.4.14.

Weaknesses & attack patterns

Weakness

CWE-409 · Improper Handling of Highly Compressed Data (Data Amplification) in catalog → MITRE ↗

Attack patterns

CAPEC-130 · Excessive Allocation MITRE ↗
CAPEC-490 · Amplification MITRE ↗

Affected — Erlang / ssh Repository ↗

3.0.1 and up affected
5.5.1 not affected
5.2.11.6 not affected
5.1.4.14 not affected
every other version: unknown
default status unknown
cpe cpe:2.3:a:erlang:erlang/otp:*:*:*:*:*:*:*:*
modules · source files · routines
modules ssh_transport
source files src/ssh_transport.erl
routines ssh_transport:decompress/2 · ssh_transport:handle_packet_part/4

Affected — GitHub / erlang/otp Repository ↗

17.0 and up affected
28.4.1 not affected
27.3.4.9 not affected
26.2.5.18 not affected
07b8f44 and up affected
43a87b9 not affected
93073c3 not affected
0c1c04b not affected
every other version: unknown
default status unknown
cpe cpe:2.3:a:erlang:erlang/otp:*:*:*:*:*:*:*:*
modules · source files · routines
modules ssh_transport
source files lib/ssh/src/ssh_transport.erl
routines ssh_transport:decompress/2 · ssh_transport:handle_packet_part/4

Workarounds

Best workaround - Disable all compression:

{preferred_algorithms, [{compression, ['none']}]}

Alternative mitigations (less secure):

  • Disable only pre-auth zlib compression (authenticated users can still exploit via zlib@openssh.com):
    {modify_algorithms, [{rm, [{compression, ['zlib']}]}]}
  • Limit concurrent sessions (reduces attack surface but does not prevent exploitation):
    {max_sessions, N}  % Cap total concurrent sessions (default is infinity)

Configurations

The SSH server or client must advertise zlib or zlib@openssh.com compression. Both are enabled by default. With zlib, the attack is pre-authentication; with zlib@openssh.com, authentication is required first.

References

Credits

Igor Morgenstern / Aisle Research Finder
Michał Wąsowski Remediation developer
Jakub Witczak Remediation reviewer

CVSS breakdown

CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
« All CVEs