Blender Object CustomData_external_read Integer Overflow Code Execution Vulnerability
A crafted external data file referenced by a Mesh layer in a .blend library causes an integer overflow when Blender calculates the allocation size for layer structures, producing an undersized heap buffer. Reading layer data into that buffer overflows it, which can lead to code execution in the context of the application.
An exploitable integer overflow exists in the CustomData Mesh loading functionality of the Blender open-source 3d creation suite. A .blend file with a specially crafted external data file can cause an integer overflow resulting in a buffer overflow which can allow for code execution under the context of the…
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 layer count read from the external data file header is multiplied by the layer structure size without an overflow check, so the allocation size wraps to a small value before data is read into it.
Impact
A heap-based buffer overflow occurs, which can allow code execution under the context of the application, though the user must first import and edit the crafted object.
What the attacker needed
Victim imports a crafted .blend library; external .data file alongside it; victim edits the imported object
The fix
The text does not describe a code fix; it recommends not using untrusted library files in a Scene.
How it was found
- Run the provided generator script with the output .blend filename, which also creates the external .data file.
- Open Blender and import the .blend file as a library.
- Navigate to the Object to import and select it.
- Create an instance of that Object in the scene.
- Enter Edit-Mode on the object to trigger the crash.
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.
Blender can store some mesh data in a separate file next to a .blend library. The program works out how much memory to reserve by multiplying a number taken from that file, and a huge number makes the result wrap around to something tiny. It then copies more data than the tiny space holds, which corrupts memory and can 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.