Skip to content
Memory corruption Advisory Advanced CVE-2022-37331

Open Babel Gaussian format orientation out-of-bounds write vulnerability

A stack-based buffer overflow exists in Open Babel's Gaussian format parser when handling the 'orientation:' line. An attacker could craft a malicious file to cause an out-of-bounds write, potentially leading to arbitrary code execution.

Claudio Bozzato Follow

Originally disclosed on Cisco Talos

High 7.3 View original

An out-of-bounds write vulnerability exists in the Gaussian format orientation functionality of Open Babel 3.1.1 and master commit 530dbfa3. A specially crafted malformed file can lead to arbitrary code execution.

Claudio Bozzato, 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 copies a token from the input line into a fixed-size buffer without ensuring enough space for a subsequent string concatenation, causing a stack buffer overflow.

Impact

Depending on compilation and stack layout, this could lead to arbitrary code execution.

What the attacker needed

Victim opens a malicious file; Open Babel version 3.1.1 or master commit 530dbfa3

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 converts chemical file formats. A bug in how it reads a certain file type (Gaussian) lets a malicious file write more data than a small buffer can hold, which can crash the program or let an 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 Claudio Bozzato

View all

185 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.