OISM libcoap, NULL Pointer Dereference, CVE-2025-65500 (Critical)

Listen to this Post

The vulnerability CVE-2025-65500 is a NULL pointer dereference in the coap_dtls_generate_cookie() function within src/coap_openssl.c of OISM libcoap version 4.3.5. This function handles DTLS cookie generation during handshakes to prevent denial-of-service attacks. It calls SSL_get_SSL_CTX() to retrieve the OpenSSL context associated with the SSL session. A crafted DTLS handshake from a remote attacker can cause SSL_get_SSL_CTX() to return NULL, typically due to malformed or maliciously structured packets that disrupt normal session establishment. The code in coap_dtls_generate_cookie() fails to validate this return value before dereferencing it to access context members. Dereferencing a NULL pointer leads to an immediate crash or segmentation fault in the application, terminating the process and causing denial of service. This flaw is exploitable remotely without authentication when libcoap is configured with DTLS support enabled. Attackers can repeatedly send crafted handshake messages to vulnerable servers, sustaining downtime and disrupting CoAP-based communication. The issue stems from inadequate error handling in the interaction between libcoap’s DTLS implementation and OpenSSL, assuming a valid non-NULL context. It affects availability and requires no user interaction, making it critical for systems relying on libcoap for IoT or network protocols.
Platform: OISM libcoap
Version: 4.3.5
Vulnerability: NULL pointer dereference
Severity: Critical
date: 11/24/2025

Prediction: Patch by 2026-01-31

What Undercode Say:

Analytics:

bash: ldconfig -p | grep libcoap

bash: strings libcoap.so | grep 4.3.5

code: if (SSL_get_SSL_CTX(ssl) == NULL) { / missing check / }

How Exploit:

Craft DTLS handshake packets targeting coap_dtls_generate_cookie() to trigger SSL_get_SSL_CTX() NULL return, causing crash via dereference.

Protection from this CVE:

Update libcoap version, apply vendor patches, disable DTLS if unused, implement input validation.

Impact:

Remote denial of service, application crash, sustained downtime.

🎯Let’s Practice Exploiting & Learn Patching For Free:

Sources:

Reported By: nvd.nist.gov
Extra Source Hub:
Undercode

🔐JOIN OUR CYBER WORLD [ CVE News • HackMonitor • UndercodeNews ]

💬 Whatsapp | 💬 Telegram

📢 Follow DailyCVE & Stay Tuned:

𝕏 formerly Twitter 🐦 | @ Threads | 🔗 Linkedin Featured Image

Scroll to Top