CVE-2025-8845
BaseFortify
Publication date: 2025-08-11
Last updated on: 2026-04-29
Assigner: VulDB
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| nasm | netwide_assembler | 2.17 |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-119 | The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program data. |
| CWE-121 | A stack-based buffer overflow condition is a condition where the buffer being overwritten is allocated on the stack (i.e., is a local variable or, rarely, a parameter to a function). |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
CVE-2025-8845 is a stack-based buffer overflow vulnerability in NASM (Netwide Assembler) version 2.17rc0, specifically in the assemble_file function of nasm.c. It occurs because the function does not properly check the bounds of stack-allocated buffers when processing assembly input files. Malformed or oversized assembly input can cause the program to write 8 bytes beyond the allocated buffer on the stack, corrupting adjacent memory such as return addresses. This can lead to program crashes or potentially allow an attacker to execute arbitrary code locally. [1, 2]
How can this vulnerability impact me? :
This vulnerability can cause NASM to crash due to stack memory corruption when processing malformed assembly files. More seriously, it may allow an attacker with local access to execute arbitrary code by exploiting the buffer overflow to overwrite critical stack data such as return addresses. This can compromise the security and stability of systems running vulnerable NASM versions, especially in development or build environments where NASM processes untrusted assembly input. [1, 2]
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability can be detected by running NASM version 2.17rc0 or the latest master branch compiled with AddressSanitizer enabled and processing a specially crafted malformed assembly input file (such as the provided proof-of-concept file named 'POC_nasm_stack_buffer_overflow_assemble_file'). The detection involves observing a crash due to stack buffer overflow. A suggested command to detect the issue is: nasm -f elf64 POC_nasm_stack_buffer_overflow_assemble_file (after compiling NASM with AddressSanitizer). [1, 2]
What immediate steps should I take to mitigate this vulnerability?
Immediate mitigation steps include avoiding the use of NASM version 2.17rc0 and the affected master branch until a patched version is released. Do not process untrusted or malformed assembly input files with the vulnerable NASM versions. Additionally, compile NASM with security features such as AddressSanitizer enabled for testing and detection. Monitor for updates or patches from the NASM project and apply them promptly once available. [1, 2]