Executive brief
Open Babel, a widely used library for converting chemical and molecular data formats, contains a memory safety flaw in its PQS file parser. An attacker could provide a specially crafted PQS file that, when opened by a user or processed by a service using this library, could lead to a program crash or potentially allow the execution of unauthorized code. This affects researchers and organizations using Open Babel for chemistry data analysis or web-based molecule viewers.
Technical details
A memory-safety vulnerability exists in Open Babel's PQS parser due to an uninitialized pointer dereference in the `pFormat` handling of the PQS reader. The flaw occurs within `PQSFormat::ReadMolecule` in `formats/PQSformat.cpp` when processing malformed input that causes the parser to access a format pointer before it has been properly initialized. An attacker can exploit this by providing a crafted PQS file to be processed via the `obabel` CLI tool, the `OBConversion` API, or any of the library's language bindings (Python, Ruby, Java, etc.). Successful exploitation could lead to arbitrary code execution or a crash. The issue is addressed in version 3.2.0 by ensuring the pointer is initialized to `nullptr` and verified before use.
Affected products
- Open Babel Open Babel Up to and including 3.1.1
Timeline
- 2023-07-21: disclosed: Initial Talos report published
- 2026-05-26: patched: Version 3.2.0 released
- 2026-07-01: advisory: GitHub Advisory published
References
- https://github.com/openbabel/openbabel/security/advisories/GHSA-8qxc-57hf-hc9j
- https://github.com/openbabel/openbabel/commit/2a7d2cda8bd47daade2e555e34b69651a2e132ef
- https://talosintelligence.com/vulnerability_reports/TALOS-2022-1670
- https://www.talosintelligence.com/vulnerability_reports/TALOS-2022-1670
- https://api.github.com/repos/openbabel/openbabel/security-advisories/GHSA-8qxc-57hf-hc9j