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

Listen to this Post

How the CVE Works:

The vulnerability exists within the `coap_dtls_generate_cookie()` function in the libcoap library’s OpenSSL integration code. During a DTLS handshake, the function calls `SSL_get_SSL_CTX()` to retrieve the SSL context pointer from a DTLS session object. A remotely initiated, crafted DTLS handshake packet can be constructed such that this function returns a NULL pointer. The libcoap code subsequently dereferences this NULL pointer without performing a proper validation check. This NULL pointer dereference leads to an immediate segmentation fault and crash of the application using the library, resulting in a reliable denial-of-service condition against the CoAP DTLS server.

DailyCVE Form:

Platform: OISM libcoap
Version: 4.3.5
Vulnerability: NULL pointer dereference
Severity: Critical
Date: 11/24/2025

Prediction: Q1 2026 patch

What Undercode Say:

Analytics:

Find potentially vulnerable systems using libcoap
find /usr -name "libcoap" 2>/dev/null
ldd /path/to/coap_app | grep -i coap
Simulate DTLS traffic to a CoAP port
openssl s_client -dtls -connect <target>:5684
// Code snippet highlighting the vulnerable pattern in coap_openssl.c
// In function: coap_dtls_generate_cookie()
SSL_CTX ctx = SSL_get_SSL_CTX(ssl); // May return NULL
// Missing NULL check before dereference
unsigned char cookie = SSL_CTX_get_app_data(ctx); // CRASH

How Exploit:

Attacker sends crafted DTLS ClientHello packet to CoAP server port (e.g., 5684). The malicious packet triggers the internal SSL context to be NULL. Libcoap dereferences NULL, causing segmentation fault. Server process crashes, denying service.

Protection from this CVE:

Apply vendor patch. Implement input validation. Use NULL pointer checks.

Impact:

Reliable denial-of-service. Service disruption.

🎯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