CVE-2022-46292: Buffer Overflow
Summary
A memory-safety vulnerability in Open Babel's MOPAC output parser allowed an out-of-bounds write into the translationVectors[] array when reading the "UNIT CELL TRANSLATION" block of a crafted input file.
Details
The MOPAC output reader stored translation vectors from the UNIT CELL TRANSLATION block into a fixed-size translationVectors[] array. A malformed block could push more vectors than the array had slots, causing a write past the end of the array. One of five translationVectors[] OOB writes in the TALOS 2022 batch.
Impact
Open Babel is a C++ library and CLI used to read and write chemistry file formats; it is shipped by Linux distributions and embedded in services that may parse untrusted input. Triggering this vulnerability requires the victim to open a malicious MOPAC output file with the obabel tool, the OBConversion API, or any of the language bindings (Python, Ruby, Java, R, Perl, C#, PHP).
Affected versions
All releases up to and including 3.1.1.
Patched version
3.2.0 (released 2026-05-26).
Patch
Fix commit: https://github.com/openbabel/openbabel/commit/40e85213
A minimized reproducer for this CVE is checked in under test/files/fuzzregress/ and is exercised on every CI build under ASAN+UBSAN by the fuzzregresstest harness.
Credit
Reported by Cisco TALOS.
Other sources
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. An attacker can provide a malicious file to trigger this vulnerability.This vulnerability affects the MOPAC file format, inside the Unit Cell Translation section
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
pip/openbabelto a version that resolves this vulnerability.Fixed in 3.2.0 - Upgrade
Upgrade
debian/openbabelto a version that resolves this vulnerability.Fixed in 3.2.0+dfsg-1~exp - Upgrade
Upgrade
Open Babelto a version that resolves this vulnerability.Fixed in 3.2.0 - Compensating control
Restrict access to services using Open Babel to parse untrusted input files; require users/services not to open crafted MOPAC output files that trigger the UNIT CELL TRANSLATION block parsing (arbitrary code execution via out-of-bounds writes).
Event History
Frequently Asked Questions
What is the vulnerability ID?
The vulnerability ID is CVE-2022-46292.
What is the severity of CVE-2022-46292?
The severity of CVE-2022-46292 is critical (7.8).
What is affected by CVE-2022-46292?
Open Babel versions 3.1.1 and master commit 530dbfa3 are affected by CVE-2022-46292.
What is the impact of CVE-2022-46292?
A specially-crafted malformed file can lead to arbitrary code execution.
How can CVE-2022-46292 be fixed?
Update to a patched version of Open Babel that addresses the out-of-bounds write vulnerabilities.