CVE-2025-8846
📋 TL;DR
A stack-based buffer overflow vulnerability exists in NASM Netwide Assembler 2.17rc0's parse_line function in parser.c. This allows local attackers to potentially execute arbitrary code or crash the application. Users who compile or process assembly code with this vulnerable version are affected.
💻 Affected Systems
- NASM Netwide Assembler
📦 What is this software?
⚠️ Risk & Real-World Impact
Worst Case
Local privilege escalation leading to full system compromise if NASM is executed with elevated privileges
Likely Case
Application crash (denial of service) or limited code execution in the context of the user running NASM
If Mitigated
Minimal impact if NASM runs with minimal privileges and proper sandboxing
🎯 Exploit Status
Exploit details have been publicly disclosed but require local access and specific assembly code manipulation
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 2.17rc1 or later
Vendor Advisory: https://bugzilla.nasm.us/show_bug.cgi?id=3392938
Restart Required: No
Instructions:
1. Download latest NASM version from official site
2. Uninstall vulnerable version
3. Install patched version
4. Verify installation with 'nasm -v'
🔧 Temporary Workarounds
Avoid processing untrusted assembly files
allOnly use NASM with trusted assembly source code
Run NASM with reduced privileges
Unix/LinuxExecute NASM as non-privileged user to limit potential damage
sudo -u nobody nasm [options]
🧯 If You Can't Patch
- Restrict NASM execution to trusted users only
- Monitor for abnormal NASM process behavior or crashes
🔍 How to Verify
Check if Vulnerable:
Run 'nasm -v' and check if output contains '2.17rc0'
Check Version:
nasm -v
Verify Fix Applied:
Run 'nasm -v' and confirm version is 2.17rc1 or later
📡 Detection & Monitoring
Log Indicators:
- NASM process crashes with segmentation faults
- Abnormal termination of compilation processes
Network Indicators:
- None - local vulnerability only
SIEM Query:
Process:Name='nasm' AND EventID=1000 (Application Crash)
🔗 References
- https://bugzilla.nasm.us/show_bug.cgi?id=3392938
- https://drive.google.com/file/d/1MQGtdnz58vRF2fAeJMJ4VGiBQWXpnqfy/view?usp=drive_link
- https://vuldb.com/?ctiid.319380
- https://vuldb.com/?id.319380
- https://vuldb.com/?submit.623189
- https://bugzilla.nasm.us/show_bug.cgi?id=3392938
- https://vuldb.com/?submit.623189