CVE-2025-8842
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-416 | The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. Any operations using the original pointer are no longer valid because the memory "belongs" to the code that operates on the new pointer. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
CVE-2025-8842 is a use-after-free vulnerability in NASM (Netwide Assembler) version 2.17rc0, specifically in the function do_directive within the source file preproc.c. It occurs because memory allocated for preprocessor directive data structures is freed prematurely and then accessed again, leading to memory corruption. This can cause program crashes, unexpected behavior, or even arbitrary code execution. Exploitation requires local access, and a proof-of-concept exploit is publicly available. [1, 2, 3]
How can this vulnerability impact me? :
This vulnerability can impact you by causing program crashes or unexpected behavior in NASM, potentially leading to denial of service. More critically, it may allow an attacker with local access to execute arbitrary code, compromising the confidentiality, integrity, and availability of the affected system. Since the exploit is publicly available and relatively easy to perform, systems using the vulnerable NASM version are at risk. [1, 2, 3]
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability can be detected by compiling NASM with AddressSanitizer enabled and running the provided proof-of-concept (PoC) exploit file named `POC_nasm_use_after_free_do_directive`. The command to trigger the vulnerability is: nasm -f dbg POC_nasm_use_after_free_do_directive This will cause a crash due to the heap-use-after-free error, confirming the presence of the vulnerability. [2, 3]
What immediate steps should I take to mitigate this vulnerability?
No known countermeasures or mitigations currently exist for this vulnerability. It is suggested to consider alternative products to avoid this vulnerability. Since exploitation requires local access, restricting local access to NASM and monitoring for suspicious activity may help reduce risk until a fix is available. [1]