GHSA-j6gx-3j6v-3hm4: NetX Secure DTLS server issues predictable HelloVerifyRequest cookies, so a spoofed client can pass the return-routability check
GHSA ID |
|
|---|---|
CVE ID |
CVE‑2026‑102719 |
Severity |
Medium |
CWE |
|
Published |
2026‑11‑01 |
Last updated |
2026‑11‑01 |
Affected packages
| Package | Vulnerable versions | Patched versions |
|---|---|---|
NetX Duo |
>= 6.0, ⇐ 6.5.2.202603a |
6.5.2.202603b |
Description
Summary
The NetX Secure DTLS server fills each HelloVerifyRequest cookie from NX_RAND(), which by default is the C library rand(), with no key and no binding to the client’s address, port or ClientHello. The cookie is the only evidence the server has that a client can receive traffic at the address it claims. An attacker who can predict the generator’s output can therefore pass the RFC 6347 cookie exchange from a spoofed address and make the server send its ServerHello flight to a victim of the attacker’s choosing.
Details
_nx_secure_dtls_send_helloverifyrequest() generates a 20-byte cookie from five consecutive NX_RAND() calls, stores it in the session and sends it to the claimed client address. _nx_secure_dtls_process_clienthello() then accepts a second ClientHello whose cookie matches the stored value and moves the server to its ServerHello flight.
NX_RAND defaults to rand(), a linear generator in common C libraries whose state can be recovered from a modest number of consecutive outputs. The server discloses such outputs directly: every HelloVerifyRequest sent to the attacker’s own address carries five, and every ServerHello random carries seven. Having recovered the state, the attacker sends a ClientHello from a spoofed address, predicts the cookie the server issues for it, and sends a second spoofed ClientHello carrying that cookie. The prediction must account for any other consumers of the same rand() stream between observation and use.
Impact
An off-path attacker defeats the return-routability check that the cookie exchange exists to provide. The server sends its ServerHello, Certificate and ServerHelloDone flight to the spoofed address, which makes it a reflector that amplifies the attacker’s traffic towards a third party. The attacker does not learn the server’s subsequent handshake messages and cannot complete the handshake by this means.
Affected configurations
Applications that run a NetX Secure DTLS server (NX_SECURE_ENABLE_DTLS, server role) and leave NX_RAND at its default. Builds that define NX_RAND as a cryptographically secure generator are not affected; NX_HIGH_SECURITY requires the application to define it.
Affected versions: [6.0, 6.5.2.202603a].
Severity
CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:N/SI:N/SA:L, CVSS-B 6.3 (Medium). CWE-338: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG).
AC:H because the attacker must recover the generator state and keep it synchronised with other consumers of the stream. Nothing on the server itself is read, altered or denied by predicting the cookie, so the vulnerable-system metrics are None; the harm falls on the reflection victim.
Patches
Fixed in NetX Duo 6.5.2.202603b. The HelloVerifyRequest cookie is now stateless: an HMAC-SHA256 over the client’s address and ports and its ClientHello, keyed by a server secret that is replaced periodically, and verified against a fresh derivation in constant time on every path, so no cookie is NX_RAND output. Applications can supply the secret through the new nx_secure_dtls_server_cookie_secret_set service; if they do not, the secret is drawn from NX_RAND, so a build that leaves NX_RAND at rand() still relies on the generator’s state remaining unknown to the attacker and should supply the secret or a cryptographic NX_RAND. New regression tests fail without the fix.