Prusa Research PrusaSlicer Objparser::objparse() stack-based buffer overflow vulnerability
A stack-based buffer overflow exists in PrusaSlicer's OBJ file parser because it reads file data into a fixed-size stack buffer without checking the amount read. An attacker could provide a malicious OBJ file to trigger the overflow and potentially execute code.
Originally disclosed on Cisco Talos
A stack-based buffer overflow vulnerability exists in the Objparser::objparse() functionality of Prusa Research PrusaSlicer 2.2.0 and Master (commit 4b040b856). A specially crafted obj file can lead to code execution.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The program reads file data into a fixed-size stack buffer using fread without verifying that the amount read fits within the buffer.
Impact
An attacker could cause a stack-based buffer overflow that may lead to arbitrary code execution.
What the attacker needed
Victim opens a malicious .obj file
The fix
The vulnerability was fixed by the vendor.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A buffer overflow happens when a program writes more data into a fixed-size memory area than it can hold, spilling into nearby memory. Here, the program reads a file into a small stack buffer without checking the size, so a large file can overwrite important data and possibly let an attacker run their own code.
What is Memory corruption?
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.