Wasmtime is a runtime for WebAssembly. From 30.0.0 to 36.0.8, 43.0.2, and 44.0.1, Wasmtime's allocation logic for a WebAssembly table contained checked arithmetic which panicked on overflow. This overflow is possible to trigger, and thus panic, when a table with an extremely large size is allocated. This is possible with the WebAssembly memory64 proposal where tables can have sizes in the 64-bit range as opposed to the previous 32-bit range which would not overflow. The panic happens when attempting to create a very large table, such as when instantiating a WebAssembly module or component. This vulnerability is fixed in 36.0.8, 43.0.2, and 44.0.1.
Wasmtime versions 30.0.0-36.0.7, 43.0.0-43.0.1, and 44.0.0 contain a denial-of-service vulnerability in WebAssembly table allocation logic. The vulnerability allows attackers to trigger integer overflow and panic the runtime by instantiating modules with extremely large tables, particularly leveraging the memory64 proposal. While no public exploit exists, the attack surface is significant for organizations running untrusted WebAssembly code or providing WASM execution services.
IMMEDIATE ACTIONS:
1. Identify all systems running Wasmtime versions 30.0.0-36.0.7, 43.0.0-43.0.1, or 44.0.0 using: wasmtime --version
2. Isolate WASM execution environments from production traffic if possible
3. Implement input validation to reject WebAssembly modules with suspiciously large table declarations
PATCHING GUIDANCE:
1. Upgrade to Wasmtime 36.0.8, 43.0.2, or 44.0.1 immediately
2. For embedded Wasmtime (Rust crates), update Cargo.lock: cargo update bytecodealliance/wasmtime
3. Verify patch installation: wasmtime --version should show patched version
COMPENSATING CONTROLS (if patching delayed):
1. Implement strict resource limits on WASM module instantiation (memory, table size caps)
2. Deploy rate limiting on module instantiation requests
3. Monitor for panic/crash events in Wasmtime logs: grep -i "panic\|overflow" /var/log/wasmtime*
4. Restrict WASM module sources to trusted, pre-validated repositories
5. Run Wasmtime in containerized environments with memory/CPU limits
DETECTION RULES:
1. Alert on Wasmtime process crashes with exit code indicating panic
2. Monitor for WebAssembly modules with table.size > 2^32 in instantiation logs
3. Track failed module instantiation attempts with memory64 proposal enabled
4. Log all WASM module sources and validate against whitelist
الإجراءات الفورية:
1. تحديد جميع الأنظمة التي تقوم بتشغيل إصدارات Wasmtime 30.0.0-36.0.7 أو 43.0.0-43.0.1 أو 44.0.0 باستخدام: wasmtime --version
2. عزل بيئات تنفيذ WASM عن حركة الإنتاج إن أمكن
3. تنفيذ التحقق من صحة الإدخال لرفض وحدات WebAssembly ذات إعلانات الجدول المريبة الكبيرة
إرشادات التصحيح:
1. الترقية إلى Wasmtime 36.0.8 أو 43.0.2 أو 44.0.1 فوراً
2. بالنسبة لـ Wasmtime المضمنة (صناديق Rust)، قم بتحديث Cargo.lock: cargo update bytecodealliance/wasmtime
3. التحقق من تثبيت التصحيح: يجب أن يعرض wasmtime --version الإصدار المصحح
الضوابط البديلة (إذا تأخر التصحيح):
1. تنفيذ حدود موارد صارمة على إنشاء مثيلات وحدة WASM (حدود الذاكرة وحجم الجدول)
2. نشر تحديد معدل على طلبات إنشاء المثيلات
3. مراقبة أحداث الذعر/الانهيار في سجلات Wasmtime: grep -i "panic\|overflow" /var/log/wasmtime*
4. تقييد مصادر وحدة WASM إلى المستودعات الموثوقة والمتحققة مسبقاً
5. تشغيل Wasmtime في بيئات حاوية مع حدود الذاكرة/وحدة المعالجة المركزية
قواعد الكشف:
1. تنبيه عند انهيار عملية Wasmtime مع رمز خروج يشير إلى الذعر
2. مراقبة وحدات WebAssembly مع table.size > 2^32 في سجلات الإنشاء
3. تتبع محاولات إنشاء المثيلات الفاشلة مع تمكين اقتراح memory64
4. تسجيل جميع مصادر وحدة WASM والتحقق من قائمة المسموحات