Microsoft Office Excel WebCharts out-of-bounds write vulnerability
A malformed Excel file containing more embedded WebChart elements than the fixed-size array can hold causes an out-of-bounds write during parsing. An attacker could use this to corrupt heap memory and potentially achieve arbitrary code execution.
Originally disclosed on Cisco Talos
An access violation vulnerability exists in the WebCharts functionality of Microsoft Office Excel 2019 Plus version 2302 build 16130.20332. A specially crafted malformed file can lead to a heap buffer overflow.
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 index used to place a WebChart element into the inline array is never checked against the array's fixed capacity of about 15 slots before a memset writes to it.
Impact
An attacker controlling the number of WebChart elements could achieve a precise out-of-bounds write and, with proper heap grooming, possibly arbitrary code execution.
What the attacker needed
Victim opens a crafted file; local user interaction
The fix
The index should be validated against the fixed capacity of the webCharts array before the memset is performed; the vendor released a patch.
How it was found
- Open a specially crafted Excel file containing many embedded WebChart elements in Excel with PageHeap enabled.
- Excel parses the chart XML and increments the WebChart index for each element.
- Once the index exceeds the fixed array capacity, the memset writes past the end of the heap allocation.
- The process crashes with an access violation on the out-of-bounds write.
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.
Excel stores a list of chart objects in a fixed-size area of memory. If a file asks for more charts than that area can hold, Excel writes past the end of the list and damages nearby memory. A crafted file could then let an attacker run their own code on the victim's machine.
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.