Impact
Unbounded recursion occurs when Elixir’s inspect/1 misclassifies a list as a charlist due to only examining the first 4096 elements for printability. When a long printable prefix is followed by an element that is not a valid code point, the conversion raises an ArgumentError. The rescue clause in List.to_string/1 rebuilds its error message by inspecting the list again, which re-enters the same misclassification path. Because the recursion is not in tail position, each level of inspection adds a frame to the process stack, steadily consuming memory until the BEAM node’s max_heap_size is exceeded or the node runs out of memory. This results in a crash for the process and can bring down the entire node if no safeguards are in place.
Affected Systems
This vulnerability affects the Elixir language standard library. All released Elixir versions from 1.15.0‑rc.0 up to but not including 1.18.5, from 1.19.0‑rc.0 up to but not including 1.19.6, and from 1.20.0‑rc.0 up to but not including 1.20.4 are vulnerable. The affected product is the Elixir compiler and runtime, maintained by elixir‑lang.
Risk and Exploitability
The CVSS score of 5.9 indicates moderate severity. The EPSS score is not available, so the current exploitation probability is uncertain, and the vulnerability is not listed in the CISA KEV catalog. An attacker must be able to supply a crafted list to inspect/1, List.to_string/1, or List.to_charlist/1 – for example, by sending a malicious payload to an exposed API that internally calls these functions. The attack is relatively straightforward and does not require privileged code execution; it exploits a flaw in the language’s standard library that causes uncontrolled recursion and memory exhaustion.
OpenCVE Enrichment