Technical impact
hex_core, Hex, and rebar3 allow an attacker with control over an untrusted repository mirror or an API server to send highly compressed payloads that decompress into extremely large binaries in the Erlang VM. In the registry path, hex_repo functions decompress the response using zlib:gunzip before checking the signature; a mirror can supply a tiny compressed body that expands into a massive envelope, which is only rejected after decompression, enabling memory exhaustion. In API responses, hex_api decodes data marked with the application/vnd.hex+erlang type via safe_binary_to_term; although the safe option blocks atom creation, it accepts compressed terms without bounding the decoded size, and the additional check for disallowed functions and ports occurs only after the term is fully built. This unbounded expansion consumes heap space, potentially crashing the running Erlang process or the entire system, resulting in denial of service. The underlying weakness is a data amplification flaw (CWE‑409).
Affected Systems
Erlang rebar3 versions from 3.9.1 through 3.27.2, Hex versions from 2.1.0 to 2.5.1 and from 2.6.0 onward, and hex_core versions from 0.1.0 to 0.19.99 are affected. The vendors are Erlang for rebar3 and hexpm for Hex and hex_core.
Risk and Exploitability
The CVSS score of 2.1 indicates low severity. The EPSS score of less than 1% implies a very low probability of exploitation, and the vulnerability is not listed in the CISA KEV catalog. The likely attack vector involves an attacker controlling a repository mirror or compromising an API server that a user relies on; exploitation would require the victim to pull packages or data from the compromised source, after which the unbounded decompression can exhaust available memory. While random exploitation is unlikely, organizations depending on third‑party mirrors or unknown component sources should measure the risk of a resource‑exhaustion attack and implement safeguards such as size limits or trusted repositories.