Executive brief
Open Babel, a widely used library for converting chemical data files, contains a security flaw in how it processes certain scientific file formats. By providing a specially crafted, malicious chemical data file to a system using this library, an attacker could potentially take control of the system or execute unauthorized commands. This is particularly concerning for web-based chemical converters or molecule viewers that use Open Babel to process user-uploaded files.
Technical details
Multiple out-of-bounds write vulnerabilities (CWE-787) exist in Open Babel 3.1.1 and master commit 530dbfa3 within the translationVectors parsing logic. The flaw is present in several format parsers including MSI, MOPAC, MOPAC Cartesian, and Gaussian. In these components, the code populates a fixed-size stack array of three vector3 objects without verifying the number of input tokens. An attacker can provide a malformed file with excessive translation vector entries, causing the 'numTranslationVectors' index to increment beyond the array bounds, leading to a stack-based buffer overflow. This can be exploited for arbitrary code execution. The vulnerability is addressed in version 3.2.0.
Affected products
- Open Babel Open Babel 3.1.1, master commit 530dbfa3
Timeline
- 2023-07-21: advisory: Original Talos and GitHub advisories published.
- 2026-07-01: other: Advisory GHSA-jrjj-9h77-6vhv withdrawn as a duplicate of GHSA-mjmg-352j-f456.