Open Babel translationVectors parsing out-of-bounds write vulnerabilities
Multiple out-of-bounds write vulnerabilities exist in the translationVectors parsing code of several Open Babel file formats. A specially crafted file can cause a stack buffer overflow, potentially leading to arbitrary code execution.
Originally disclosed on Cisco Talos
Multiple out-of-bounds write vulnerabilities exist in the translationVectors parsing functionality in multiple supported formats of Open Babel 3.1.1 and master commit 530dbfa3. A specially-crafted malformed file can lead to arbitrary 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 code uses a fixed-size array of three vector3 elements and increments an index without bounds checking while parsing translation vectors from the input file.
Impact
A remote attacker could cause a stack buffer overflow, potentially leading to arbitrary code execution.
What the attacker needed
Victim opens a malicious file; Open Babel used to parse the file
How it was found
- Create a malformed input file for one of the affected formats (MSI, MOPAC, MOPAC Cartesian, or Gaussian) containing many translation vector lines.
- Run the obabel converter with the crafted file as input and any output format.
- The parser reads translation vectors into a fixed-size array without checking the count, causing a stack buffer 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.
Open Babel is a tool that reads and converts chemical file formats. In several formats, it stores translation vectors in a fixed-size array of three elements but does not check how many vectors are read from the file. By supplying a file with many translation vectors, an attacker can write past the end of that array on the stack, which may crash the program or allow code execution.
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.