Microsoft Office Excel FreePhisxdb arbitrary free vulnerability
A malformed Excel file can trigger an out-of-bounds read in the FreePhisxdb function, where data read past the end of an array is treated as a pointer and freed. With heap grooming, this could lead to arbitrary free and potentially arbitrary code execution.
Originally disclosed on Cisco Talos
An arbitrary free vulnerability exists in the FreePhisxdb functionality of Microsoft Office Excel 2019 Plus 16.0.16130.20218. A specially-crafted malformed file can lead to an arbitrary free.
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
Likely a mismatch between the number of array dimensions recorded during initial parsing and the actual allocated size after a malformed Schema element is skipped, leading to an out-of-bounds read and free.
Impact
With proper heap grooming, this might lead to arbitrary free and finally to arbitrary code execution.
What the attacker needed
Victim opens a malicious file
The fix
The vendor released a patch on 2023-06-13.
How it was found
- Craft a malformed Excel file that triggers the FreePhisxdb functionality.
- Open the file in Microsoft Excel 2019 Plus.
- Observe the crash in FreePhisxdb due to out-of-bounds read.
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.
When Excel opens a file, it reads data into memory and later frees it. A specially crafted file can make Excel read past the end of a list and then try to free whatever value it finds there, which can crash the program or, with careful setup, let an attacker control what gets freed. This is a memory corruption bug that could be exploited to run 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.