CVE-2021-33796
📋 TL;DR
CVE-2021-33796 is a use-after-free vulnerability in MuJS's regexp source property access that can lead to denial of service. This affects applications using MuJS before version 1.1.2 for JavaScript parsing/execution. Attackers could crash the application by exploiting this memory corruption flaw.
💻 Affected Systems
- MuJS (lightweight JavaScript interpreter)
📦 What is this software?
Mujs by Artifex
⚠️ Risk & Real-World Impact
Worst Case
Complete application crash leading to denial of service, potentially allowing further memory corruption attacks if combined with other vulnerabilities.
Likely Case
Application instability and crashes when processing malicious regexp patterns, causing service disruption.
If Mitigated
Minimal impact with proper input validation and sandboxing, though crashes may still occur.
🎯 Exploit Status
The vulnerability is in regexp handling, making exploitation straightforward with crafted JavaScript input.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 1.1.2 and later
Vendor Advisory: https://github.com/ccxvii/mujs/commit/7ef066a3bb95bf83e7c5be50d859e62e58fe8515
Restart Required: Yes
Instructions:
1. Update MuJS to version 1.1.2 or later. 2. Recompile any applications using MuJS. 3. Restart affected services.
🔧 Temporary Workarounds
Input Validation
allValidate and sanitize JavaScript input before passing to MuJS, especially regexp patterns.
Sandbox Execution
allRun MuJS in isolated containers or sandboxes to limit impact of crashes.
🧯 If You Can't Patch
- Disable regexp functionality if not required
- Implement strict input filtering for JavaScript code
🔍 How to Verify
Check if Vulnerable:
Check MuJS version with 'mujs --version' or examine library version in application.
Check Version:
mujs --version
Verify Fix Applied:
Confirm version is 1.1.2 or later and test with known malicious regexp patterns.
📡 Detection & Monitoring
Log Indicators:
- Application crashes
- Segmentation fault errors
- Memory access violation logs
Network Indicators:
- Unusual patterns of JavaScript/regexp input
SIEM Query:
search 'segmentation fault' OR 'memory corruption' AND 'mujs'