libigl readMSH out-of-bounds read vulnerability
The readMSH function in libigl v2.5.0 assumes that the number of entries in the ElementData section matches the number of elements in the Element section. A crafted .msh file with too few ElementData entries can cause an out-of-bounds read, potentially leaking heap data.
Originally disclosed on Cisco Talos
Multiple out-of-bounds read vulnerabilities exist in the readMSH functionality of libigl v2.5.0. A specially crafted .msh file can lead to an out-of-bounds read.
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 code assumes that the number of entries in the ElementData section matches the number of elements, but this is not enforced when parsing the file.
Impact
An attacker could exploit this to leak heap data, which might be used to bypass ASLR or access sensitive information, though the CVSS score indicates limited confidentiality impact.
What the attacker needed
Victim opens a malicious .msh file
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 a program reads a file, it often trusts that the file's contents follow certain rules. Here, the library expects the file to list a certain number of data entries for each element, but a malicious file can break that rule. This causes the program to read memory beyond the intended data, which could expose sensitive information.
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.