Skip to content
Memory corruption Advisory Advanced CVE-2024-23948CVE-2024-23951CVE-2024-23947CVE-2024-23950CVE-2024-23949

libigl readMSH improper array index validation vulnerability

Multiple out-of-bounds write vulnerabilities exist in libigl's readMSH function when parsing .msh files, because node and element indices from the file are used without bounds checking. An attacker can provide a malicious .msh file to trigger an out-of-bounds write, potentially leading to code execution.

Philippe Laulheret Follow

Originally disclosed on Cisco Talos

High 8.8 View original

Multiple improper array index validation vulnerabilities exist in the readMSH functionality of libigl v2.5.0. A specially crafted .msh file can lead to an out-of-bounds write.

Philippe Laulheret, on Cisco Talos

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 uses node and element indices from the .msh file to index into vectors without validating that the indices are within the allocated bounds.

Impact

An attacker could cause an out-of-bounds write, potentially leading to code execution with the privileges of the user opening the file.

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 uses numbers from the file to decide where to store data in memory. If those numbers are not checked, an attacker can put a huge or negative number to make the program write outside the intended memory area. This can crash the program or let the 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.

More by Philippe Laulheret

View all

35 more disclosed reports, best first.

More from Cisco Talos

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.