CVE-2026-54887: Erlang/OTP DTLS Cookie Forgery via Default Cryptographic Key
Erlang/OTP's DTLS server uses a predictable cookie value during startup instead of a random one, allowing attackers to forge valid DTLS cookies within a narrow window (0-15 seconds after server restart). The DTLS cookie is a security mechanism designed to prevent attackers from using spoofed IP addresses to force a server into expensive cryptographic operations. By observing unencrypted ClientHello messages, an attacker can compute the cookie themselves and bypass this protection, enabling amplification attacks with forged source addresses. This affects DTLS deployments in OTP versions 20.0 through 29.0.2 and specific patch releases.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 4.8 MEDIUM · CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N
- Weaknesses (CWE)
- CWE-1394
- Affected products
- 2 configuration(s)
- Published / Modified
- 2026-07-02 / 2026-07-24
NVD description (verbatim)
Use of Default Cryptographic Key vulnerability in Erlang/OTP ssl (DTLS server) allows predictable DTLS cookie computation during the startup window, enabling source address verification bypass. On DTLS server startup, dtls_server_connection:initial_hello/3 initializes previous_cookie_secret to the empty binary (<<>>) instead of a random value. Because HMAC with an empty key is deterministic, anyone who observes the plaintext ClientHello can compute dtls_handshake:cookie(<<>>, IP, Port, Hello) and forge a valid DTLS cookie before the first rotation of the cookie secret. The DTLS cookie (RFC 6347 §4.2.1) is a denial-of-service mitigation that prevents spoofed source IPs from forcing the server to allocate state and perform expensive cryptographic operations; it is not an authentication mechanism. During the window from server startup until the first secret rotation (0 to 15 seconds), an attacker who can observe the plaintext ClientHello can bypass the source address verification, enabling DTLS handshake amplification with spoofed source addresses. This vulnerability is associated with program file lib/ssl/src/dtls_server_connection.erl and program routine dtls_server_connection:initial_hello/3. This issue affects OTP from OTP 20.0 before OTP 29.0.3, OTP 28.5.0.3 and OTP 27.3.4.14, corresponding to ssl from 8.2 before 11.7.3, 11.6.0.3 and 11.2.12.10.
5 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
The vulnerability stems from `dtls_server_connection:initial_hello/3` initializing `previous_cookie_secret` to an empty binary (`<<>>`) rather than a cryptographically random value at startup. RFC 6347 specifies that DTLS cookies use HMAC to prevent denial-of-service amplification attacks. However, HMAC with an empty key produces a deterministic output. An attacker who observes plaintext ClientHello traffic can invoke `dtls_handshake:cookie(<<>>, IP, Port, Hello)` to recompute the exact cookie the server would generate, bypassing the intended source address verification. The vulnerability window closes after the first cookie secret rotation, typically 15 seconds post-startup. This is classified as CWE-1394 (Use of a Broken or Risky Cryptographic Algorithm), reflecting the use of a predictable cryptographic constant in a security-critical context.
Business impact
Organizations running DTLS-dependent services (such as CoAP gateways, IoT platforms, or VPN endpoints built on Erlang/OTP) face potential amplification attacks during server restarts or deployments. An attacker exploiting this could direct high-volume traffic toward victim IP addresses by spoofing source IPs in DTLS handshake requests, potentially disrupting service availability or overwhelming downstream systems. The practical impact is limited by the 15-second exploitation window and the requirement to observe plaintext traffic, but in containerized or cloud environments with frequent restarts, the cumulative exposure may be significant.
Affected systems
The vulnerability affects Erlang/OTP ssl library versions: OTP 20.0 through OTP 29.0.2 (ssl versions 8.2 through 11.7.2), with patches available in OTP 29.0.3 (ssl 11.7.3), OTP 28.5.0.3 (ssl 11.6.0.3), and OTP 27.3.4.14 (ssl 11.2.12.10). Systems running DTLS services on vulnerable Erlang/OTP versions are at risk. Applications that do not expose DTLS endpoints or that use non-Erlang DTLS implementations are not affected. The vulnerability is specific to the DTLS server role; DTLS clients are unaffected.
Exploitability
Exploitation requires three conditions: (1) the target must be running a vulnerable DTLS server on Erlang/OTP, (2) the attacker must have network visibility to observe plaintext ClientHello messages (achievable on shared networks or through passive eavesdropping), and (3) the attacker must exploit within approximately 15 seconds of server startup. The technical bar is low—computing an HMAC is trivial—but the temporal constraint and observability requirement moderate practical exploitability. The vulnerability is not currently tracked on the CISA Known Exploited Vulnerabilities catalog, indicating no widespread active exploitation has been reported.
Remediation
Upgrade to patched versions: OTP 29.0.3 or later, OTP 28.5.0.3, or OTP 27.3.4.14 (or later in the 27.x line). Verify the corresponding ssl library version matches the patched release. For organizations unable to patch immediately, mitigation strategies include: deploying DTLS endpoints behind a network-level rate limiter or ingress filter to reduce amplification potential; minimizing server restart frequency; and implementing network-level monitoring for anomalous DTLS handshake patterns from spoofed sources.
Patch guidance
Consult the official Erlang/OTP release notes to confirm patch availability for your current version. OTP follows a versioning scheme where patches are released as incremental updates (e.g., OTP 29.0.3). Test patches in a staging environment before production deployment, particularly if your application has long-running DTLS connections or relies on specific OTP features. The ssl library upgrade should be transparent to most applications, but verify DTLS handshake behavior under normal and restart conditions.
Detection guidance
Monitor DTLS servers for signs of exploitation: (1) unexpected spikes in DTLS ClientHello messages immediately following server restarts, especially with varied source IPs, (2) ClientHello traffic from spoofed or unlikely source addresses, and (3) successful DTLS cookie validation despite mismatched source addresses (if your instrumentation tracks this). Enable logging of DTLS handshake events and correlate with server restart timestamps. Network-level indicators include high-volume UDP traffic on DTLS ports (typically 5684 for CoAP/DTLS) originating from multiple IPs targeting a single destination during narrow time windows.
Why prioritize this
Although assigned a CVSS score of 4.8 (MEDIUM), this vulnerability warrants near-term attention because: (1) the exploit window is narrow but predictable (tied to deployment schedules), (2) organizations running container orchestration with frequent restarts face cumulative exposure, and (3) amplification attacks can impact availability of collocated systems. However, it is not an emergency fix given the observability requirements and lack of current active exploitation. Prioritize based on your DTLS deployment footprint and restart frequency.
Risk score, explained
The CVSS 3.1 score of 4.8 reflects: Attack Vector = Network (unauthenticated, remote), Attack Complexity = High (requires observing plaintext traffic and timing), Privileges Required = None, User Interaction = None, Scope = Unchanged, Confidentiality Impact = Low (information leakage via amplification), Integrity Impact = Low (ability to inject traffic), and Availability Impact = None (CVSS does not score amplification DoS in this vector). The 'H' attack complexity appropriately reflects the practical constraints. In environments with high DTLS restart frequency or where amplification attacks pose significant business risk, consider this a local risk elevation.
Frequently asked questions
Do I need to patch if I don't run DTLS services?
No. This vulnerability is specific to DTLS servers on Erlang/OTP. Applications using OTP for other purposes (e.g., Erlang clustering, message passing) are not affected. Verify whether your deployment exposes DTLS endpoints on ports like 5684 (CoAP) or custom DTLS ports.
What's the difference between this and a regular cryptographic key issue?
This is specifically a 'default' key issue: the vulnerability is not a weak algorithm but the use of an empty (default) key instead of a random one. An empty HMAC key produces deterministic output, making the DTLS cookie forgeable. A production deployment that initialized the key randomly would not be vulnerable.
Can an attacker exploit this without seeing network traffic?
In practice, no. The attacker must observe plaintext ClientHello messages to recompute the cookie. If DTLS traffic is encrypted end-to-end or protected by a VPN, observability is restricted to network segments where the plaintext is visible (e.g., your internal network). This limits exploitation to attackers with appropriate network vantage point.
If I can't patch immediately, what should I do?
Implement network-level rate limiting on DTLS ports to reduce amplification effectiveness. Monitor for unusual DTLS handshake patterns post-restart. Plan a patching window aligned with your deployment cadence—since the vulnerability window closes 15 seconds after restart, frequent updates proportionally increase total exposure. Test patches in staging first.
This analysis is based on published CVE details and Erlang/OTP vendor advisories current as of the source data publication date. Exploit details and proof-of-concept code are not included. Readers should verify patch version numbers and applicability against official Erlang/OTP release notes before deploying. This vulnerability is not currently tracked as actively exploited by CISA as of the source data date; threat landscape changes may warrant reassessment. SEC.co assumes no liability for decisions made based on this analysis. Source: NVD (public-domain), retrieved 2026-08-11. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2026-48855MEDIUMErlang OTP SSH Path Disclosure via Symlink Enumeration
- CVE-2026-48856MEDIUMErlang OTP httpc Credential Leakage via Cross-Origin Redirects
- CVE-2026-48858MEDIUMErlang/OTP FTP SSRF via Unvalidated PASV Response
- CVE-2026-48859MEDIUMErlang/OTP SSH Timing Side-Channel Username Enumeration
- CVE-2026-48860MEDIUMErlang/OTP SSL inet_tls_dist IP Spoofing Allows Cluster Bypass
- CVE-2026-49760MEDIUMErlang OTP Stack Buffer Overflow in erl_interface – Patch Now
- CVE-2026-53422MEDIUMErlang OTP SSH SFTP Path Enumeration Vulnerability
- CVE-2026-54886MEDIUMErlang/OTP SSH SFTP Infinite Loop Denial of Service