CVE-2026-2704: Open Babel CIF File transform3d.cpp DescribeAsString out-of-bounds
### Summary A memory-safety vulnerability in Open Babel's CIF file format parser allowed an out-of-bounds read when reading a crafted input file. ### Details The flaw was in OpenBabel::transform3d::DescribeAsString. A malformed symmetry-operation string caused the parser to read past the end of its internal buffer while formatting the description. ### 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 CIF file with the obabel tool, the OBConversion API, or any of the language bindings. ### 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/e23a224b Tracked in #2862. A minimized reproducer for this CVE is checked in at test/files/fuzzregress/cve-2026-2704.cif and is exercised on every CI build under ASAN+UBSAN by the fuzzregresstest harness. ### Credit Reported by Vedant Madane (@VedantMadane).
Other sources
A security vulnerability has been detected in Open Babel up to 3.1.1. The affected element is the function OpenBabel::transform3d::DescribeAsString of the file src/math/transform3d.cpp of the component CIF File Handler. The manipulation leads to out-of-bounds read. It is possible to initiate the attack remotely. The exploit has been disclosed publicly and may be used. Upgrading to version 3.2.0 is sufficient to fix this issue. The identifier of the patch is e23a224b8fd9d7c2a7cde9ef4ec6afb4c05aa08a. It is suggested to install a patch to address this issue.
— MITRE
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 - Upgrade
Upgrade
debian/openbabelto a version that resolves this vulnerability.Fixed in 3.2.0+dfsg-2 - Upgrade
Upgrade
Open Babelto a version that resolves this vulnerability.Fixed in 3.2.0Patch e23a224b8fd9d7c2a7cde9ef4ec6afb4c05aa08a - Compensating control
Until upgraded, avoid having `obabel`/Open Babel parse attacker-controlled chemistry CIF files (untrusted input) via the Open Babel CLI (`obabel`), the OBConversion API, or language bindings.
Event History
Frequently Asked Questions
What is the severity of CVE-2026-2704?
CVE-2026-2704 has been classified as a security vulnerability that allows for potential out-of-bounds access.
How do I fix CVE-2026-2704?
To fix CVE-2026-2704, you should update Open Babel to version 3.1.2 or later.
What does CVE-2026-2704 affect?
CVE-2026-2704 affects the OpenBabel::transform3d::DescribeAsString function in the CIF File Handler of Open Babel versions up to 3.1.1.
What type of vulnerability is CVE-2026-2704?
CVE-2026-2704 is an out-of-bounds vulnerability that can lead to undefined behavior or potential data leakage.
Who is impacted by CVE-2026-2704?
Users and developers using Open Babel versions up to 3.1.1 are impacted by CVE-2026-2704.