Executive brief
A vulnerability in the Erlang/OTP public_key library can allow a remote attacker to crash the entire Erlang Virtual Machine (VM). By providing a specially crafted security certificate during a standard encrypted connection (TLS) handshake, an attacker can force the system to exhaust its memory and processing power. This affects any application using Erlang's built-in SSL/TLS capabilities, including web servers and clients, potentially leading to a complete service outage.
Technical details
The vulnerability exists in the RFC 5280 policy processing logic within Erlang's public_key library, specifically in the pubkey_policy_tree module. When validating an X.509 certificate chain, the functions add_leaves/2 and add_leaf_siblings/2 can cause the policy tree to grow exponentially (O(M^K)) if a chain contains many policies per certificate. An unauthenticated remote attacker can exploit this during a TLS handshake by presenting a crafted certificate chain, leading to BEAM scheduler pinning and memory exhaustion. This is a resource exhaustion vulnerability (CWE-770) similar to historical policy tree DoS issues in OpenSSL. Patches have been released in OTP versions 29.0.4, 28.5.0.4, and 27.3.4.15 which introduce a monotonic node counter to cap tree growth.
Affected products
- Erlang OTP 26.2 before 29.0.4, 28.5.0.4, and 27.3.4.15
- Erlang public_key 1.15 before 1.21.4, 1.20.3.4, and 1.17.1.5
Timeline
- 2026-07-16: other: Fix authored
- 2026-07-23: patched: Fix committed to repository
- 2026-07-27: advisory: NVD and CNA advisory published
References
- https://github.com/
- https://cna.erlef.org/cves/CVE-2026-59251.html
- https://github.com/erlang/otp/commit/f04c6bba38de1cf1b1836a7d9a9fbe239bd939e8
- https://github.com/erlang/otp/commit/f8580fc117098c08165f46c26fd0750c5cfb2a90
- https://github.com/erlang/otp/security/advisories/GHSA-622p-qfh6-c352
- https://www.erlang.org/doc/system/versions.html