CVE-2024-35418
📋 TL;DR
CVE-2024-35418 is a heap overflow vulnerability in wac's setup_call function that allows attackers to cause Denial of Service (DoS) by providing a malicious WebAssembly (wasm) file. This affects systems running vulnerable versions of wac that process untrusted wasm files. The vulnerability requires an attacker to supply a crafted wasm file to the application.
💻 Affected Systems
- wac (WebAssembly C interpreter)
📦 What is this software?
Wac by Kanaka
⚠️ Risk & Real-World Impact
Worst Case
Complete service disruption through DoS, potentially leading to remote code execution if heap corruption can be controlled precisely.
Likely Case
Service crashes and DoS from malformed wasm file processing.
If Mitigated
Limited impact if wasm files are from trusted sources only.
🎯 Exploit Status
Proof of concept available in GitHub issue; exploitation requires providing crafted wasm file.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Versions after commit 385e1 (check GitHub for latest)
Vendor Advisory: https://github.com/kanaka/wac/issues/19
Restart Required: Yes
Instructions:
1. Update wac to latest version from GitHub repository. 2. Recompile if using source. 3. Restart any services using wac.
🔧 Temporary Workarounds
Restrict wasm file sources
allOnly allow wasm files from trusted, verified sources.
Input validation
allImplement strict validation of wasm files before processing.
🧯 If You Can't Patch
- Isolate wac instances in restricted network segments
- Implement application-level firewalls to filter wasm file uploads
🔍 How to Verify
Check if Vulnerable:
Check wac version/commit hash; if at or before 385e1, likely vulnerable.
Check Version:
wac --version or check git commit hash if built from source
Verify Fix Applied:
Verify wac version is after commit 385e1 and test with known malicious wasm file.
📡 Detection & Monitoring
Log Indicators:
- Application crashes, segmentation faults, abnormal termination of wac processes
Network Indicators:
- Unexpected wasm file uploads to services using wac
SIEM Query:
Process:name='wac' AND EventID=1000 (Application Crash)