AutoDesk AutoCAD 2019 cell margin code execution vulnerability
A heap overflow in AutoCAD's DXF parser occurs when an AcCellMargin object receives more than six margin values, allowing an attacker to execute code by sending a crafted DXF file.
Originally disclosed on Cisco Talos
An exploitable heap overflow vulnerability exists in the DXF-parsing functionality of AutoDesk AutoCAD 2019 P.46.0.0. A specially crafted DXF file with too many cell margins populating an AcCellMargin object can cause a heap overflow, resulting in 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 parser does not limit the number of margin values written to the AcCellMargin object, which is allocated with space for only six values.
Impact
An attacker could execute arbitrary code on the victim's machine by convincing them to open a malicious DXF file.
What the attacker needed
Victim opens a crafted DXF file
How it was found
- Create a DXF file containing a group code 301 element (AcCellMargin).
- Include more than six group code 40 data blocks with margin values.
- Open the crafted DXF file in AutoCAD 2019.
- The parser writes each margin value beyond the allocated buffer, causing a heap overflow.
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 heap overflow is a memory corruption bug where a program writes more data than a buffer can hold, potentially allowing an attacker to control execution. Here, a specially crafted DXF file with too many margin values causes the overflow, and opening it could 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.