CVE-2024-35492

7.5 HIGH

📋 TL;DR

This vulnerability in Cesanta Mongoose allows attackers to cause a Denial of Service (DoS) by sending a specially crafted MQTT packet that triggers a NULL pointer dereference in the scpy function. Any system running vulnerable versions of Mongoose with MQTT functionality enabled is affected. The vulnerability can crash the application, disrupting services.

💻 Affected Systems

Products:
  • Cesanta Mongoose Embedded Web Server
Versions: Versions up to and including commit b316989
Operating Systems: All platforms running Mongoose
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects systems with MQTT functionality enabled. The vulnerability is in the MQTT packet parsing code.

⚠️ Manual Verification Required

This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.

Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).

🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.

Recommended Actions:
  1. Review the CVE details at NVD
  2. Check vendor security advisories for your specific version
  3. Test if the vulnerability is exploitable in your environment
  4. Consider updating to the latest version as a precaution

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete service outage with potential for repeated crashes preventing service recovery.

🟠

Likely Case

Application crash requiring restart, causing temporary service disruption.

🟢

If Mitigated

Minimal impact with proper network filtering and monitoring in place.

🌐 Internet-Facing: HIGH - MQTT services exposed to internet are directly vulnerable to unauthenticated DoS attacks.
🏢 Internal Only: MEDIUM - Internal attackers or compromised systems could exploit this to disrupt services.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Public proof-of-concept demonstrates crash via crafted MQTT packet. Exploitation requires network access to MQTT service.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Versions after commit b316989

Vendor Advisory: https://github.com/cesanta/mongoose/commit/b316989

Restart Required: Yes

Instructions:

1. Update Mongoose to latest version from GitHub repository. 2. Recompile application with updated library. 3. Restart affected services.

🔧 Temporary Workarounds

Disable MQTT functionality

all

If MQTT is not required, disable it in Mongoose configuration

Set MG_ENABLE_MQTT=0 in build configuration

Network filtering

linux

Block external access to MQTT port (typically 1883)

iptables -A INPUT -p tcp --dport 1883 -j DROP

🧯 If You Can't Patch

  • Implement network segmentation to isolate MQTT services
  • Deploy rate limiting on MQTT connections to mitigate DoS impact

🔍 How to Verify

Check if Vulnerable:

Check Mongoose version or commit hash. If using commit b316989 or earlier with MQTT enabled, system is vulnerable.

Check Version:

Check application logs or build configuration for Mongoose version information

Verify Fix Applied:

Verify Mongoose version is updated beyond commit b316989 and test MQTT functionality with normal traffic.

📡 Detection & Monitoring

Log Indicators:

  • Application crash logs
  • Segmentation fault errors
  • Unexpected process termination

Network Indicators:

  • Unusual MQTT packet patterns
  • Multiple connection attempts to MQTT port

SIEM Query:

source="application.logs" AND ("segmentation fault" OR "null pointer" OR "mongoose crash")

🔗 References

📤 Share & Export