OTP: Uncontrolled Recursion
CVE-2026-58227 is a high-severity uncontrolled recursion vulnerability in OTP from Erlang, with a CVSS 3.1 base score of 7.5 out of 10. It can be exploited remotely over the network by an unauthenticated attacker, without any action from a user. Affected OTP versions: 23.2 and later; 10.2 and later; addc42df113f8f15fc20e9dff45490b3ce0d3d6b and later. The record does not name a fixed version, so check the vendor advisory. There is no confirmed exploitation so far. EPSS estimates a 0.48% chance of exploitation within 30 days, which is low compared with other CVEs.
High severity with no evidence of exploitation so far.
What to do
- Update Erlang/otp to 27.3.4.15 or 28.5.0.4 or 29.0.4, whichever matches your release line, or a later version.
- Update Erlang/ssl to 11.2.12.11 or 11.6.0.4 or 11.7.4, whichever matches your release line, or a later version.
- Read the advisory on github.com for workarounds and exact fixed builds.
- Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Erlang | OTP | 23.2 and later; 10.2 and later; addc42df113f8f15fc20e9dff45490b3ce0d3d6b and later | Not stated |
| Erlang | Erlang/otp | 23.2 up to, but not including, 27.3.4.15; 28.0 up to, but not including, 28.5.0.4; 29.0 up to, but not including, 29.0.4 | 27.3.4.15, 28.5.0.4, 29.0.4 |
| Erlang | Erlang/ssl | 10.2 up to, but not including, 11.2.12.11; 11.3 up to, but not including, 11.6.0.4; 11.7 up to, but not including, 11.7.4 | 11.2.12.11, 11.6.0.4, 11.7.4 |
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- NetworkCan be exploited remotely over a network, including the internet.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- NoneNo account or login is needed.
- User interaction
- NoneNo action by a victim is required.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- NoneNo data is disclosed.
- Integrity
- NoneNothing can be modified.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H. Scored by NVD.
| Scoring system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 4.0 | 8.7 | High | CNA |
| CVSS 3.1 | 7.5 | High | NVD |
Official description
The Erlang/OTP ssl application does not detect cycles when reconstructing an incomplete peer certificate chain during a TLS or DTLS handshake. In ssl_certificate:handle_incomplete_chain/5, the received chain is passed to ssl_certificate:build_certificate_chain/5, which walks issuer relationships via ssl_certificate:do_certificate_chain/7 with no cycle detection and no depth limit. When the peer supplies two mutually cross-signed certificates in unordered form (A issues B, B issues A), the issuer lookup alternates between the two certificates and the pair of functions recurses indefinitely, growing the call stack and chain accumulator without bound. An unauthenticated remote attacker can send a crafted certificate chain in a TLS or DTLS Certificate handshake message to exhaust available memory and crash the BEAM node. Only a TCP connection and a partial handshake are required; no authentication or completed handshake is needed, and both TLS/DTLS servers and clients are affected when processing peer certificate messages. This issue affects OTP from OTP 23.2 before OTP 27.3.4.15, OTP 28.5.0.4, and OTP 29.0.4, corresponding to ssl from 10.2 before 11.2.12.11, 11.6.0.4, and 11.7.4.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Uncontrolled Recursion
The product does not properly control the amount of recursion that takes place, consuming excessive resources, such as allocated memory or the program stack.
How developers prevent this class of flaw
- Ensure that an end condition will be reached under all logic conditions. The end condition may include checking against the depth of recursion and exiting with an error if the recursion goes too deep. The complexity of the end condition contributes to the effectiveness of this action.
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: none, automatable: yes, technical impact: partial).
- Record last changed materially (score, affected products, status or references).
References
Patches and release notes
- cna.erlef.org/cves/CVE-2026-58227.htmlThird Party Advisory
- github.com/erlang/otp/commit/0307bff2c72b685c6bd952daaac6bd661c247d62
- github.com/erlang/otp/commit/241d43703989fec4b6bf637beaeb366d92dcc4c2
- github.com/erlang/otp/commit/7db64720177961e04545681480d691c4be81c54d
- github.com/erlang/otp/commit/addc42df113f8f15fc20e9dff45490b3ce0d3d6b
- osv.dev/vulnerability/EEF-CVE-2026-58227Third Party Advisory
- erlang.org/doc/system/versions.html#order-of-versionsRelease Notes
Other vulnerabilities in OTP
- 8.2 High severity
- 9.3 Critical severity
- 7.1 High severity
- 8.2 High severity
- 8.2 High severity
- 8.7 High severity
Recent Uncontrolled Recursion vulnerabilities
- 7.0 High severity
- 7.5 High severity
- 7.5 High severity
- 7.5 High severity
- 7.5 High severity
- 7.5 High severity
Spotted an error? Tell us.