5.3medium
Open Babel MOL2 File atom.h SetFormalCharge out-of-bounds
- Severity
- 5.3medium CVSS:4.0 by VulDB
- Exploit likelihood
- 0.94% (higher than 60% of CVEs)
- Published
- Last changed
- Assigned by
- VulDB
- Also known as
- GHSA-4w5w-4fhm-q483PYSEC-2026-2770
Description
A vulnerability was detected in Open Babel up to 3.1.1. The impacted element is the function OBAtom::SetFormalCharge in the library include/openbabel/atom.h of the component MOL2 File Handler. The manipulation results in out-of-bounds read. It is possible to launch the attack remotely. The exploit is now public and may be used. The patch is identified as e23a224b8fd9d7c2a7cde9ef4ec6afb4c05aa08a. A patch should be applied to remediate this issue. The project was informed of the problem early through an issue report but has not responded yet.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Open Babel | 3.1.0, 3.1.1 | CVE List |
| openbabel (PyPI) | before 3.2.0 | GitHub Advisory Database, PyPA Advisory Database |
| openbabel open_babel | up to 3.1.1 | NVD |
All scores
| VulDB | 5.3medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:P |
| VulDB | 4.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L/E:P/RL:O/RC:C |
| VulDB | 4.3medium CVSS:3.0 | CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L/E:P/RL:O/RC:C |
| VulDB | 5.0medium CVSS:2.0 | AV:N/AC:L/Au:N/C:N/I:N/A:P/E:POC/RL:OF/RC:C |
| GitHub | 5.5low CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H |
| GitHub | low CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:P |
| NVD | 8.1high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H |
| PyPA Advisory Database | 5.5medium CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H |
| PyPA Advisory Database | Not scored CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:P |
Classification
What each source says
CVE List
A vulnerability was detected in Open Babel up to 3.1.1. The impacted element is the function OBAtom::SetFormalCharge in the library include/openbabel/atom.h of the component MOL2 File Handler. The manipulation results in out-of-bounds read. It is possible to launch the attack remotely. The exploit is now public and may be used. The patch is identified as e23a224b8fd9d7c2a7cde9ef4ec6afb4c05aa08a. A patch should be applied to remediate this issue. The project was informed of the problem early through an issue report but has not responded yet.
GitHub Advisory Database
Summary
A memory-safety vulnerability in Open Babel's MOL2 file format parser caused a NULL pointer dereference when reading a crafted input file.
Details
The flaw was in OBAtom::SetFormalCharge as called from the MOL2
parser. A malformed atom record caused the parser to call the method
on a NULL atom pointer.
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 MOL2 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/e23a224b Tracked in #2862.
A minimized reproducer for this CVE is checked in under
test/files/fuzz_regress/ and is exercised on every CI build under
ASAN+UBSAN by the fuzzregresstest harness.
Credit
Reported by Vedant Madane (@VedantMadane) via VulDB.
NVD (es)
Se encontró una vulnerabilidad en Open Babel hasta la versión 3.1.1. La cual afecta a la función OBAtom::SetFormalCharge en la librería include/openbabel/atom.h del componente Gestor de Archivos MOL2. Si se manipula se puede provocar una lectura fuera de límites. Es posible lanzar el ataque de forma remota. El exploit es ahora público y puede ser utilizado. Se informó al proyecto con anterioridad a través de un informe de incidencias, pero aún no ha respondido.
References
| https://vuldb.com/?id.346651 | technical-description, third-party-advisory, vdb-entry, web | |
| https://vuldb.com/?ctiid.346651 | permissions-required, signature, vdb-entry, web | |
| https://vuldb.com/?submit.754379 | third-party-advisory, vdb-entry, web | |
| https://github.com/openbabel/openbabel/issues/2848 | exploit, issue-tracking, web | |
| https://github.com/openbabel/openbabel/pull/2862 | issue-tracking, patch, web | |
| https://github.com/oneafter/0128/blob/main/ob2/repro.mol2 | exploit, web | |
| https://github.com/VedantMadane/openbabel/commit/e23a224b8fd9d7c2a7cde9ef4ec6afb4c05aa08a | patch, web | |
| https://github.com/openbabel/openbabel/security/advisories/GHSA-4w5w-4fhm-q483 | web | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-2705 | advisory | |
| https://github.com/openbabel/openbabel | package | |
| https://pypi.org/project/openbabel | package | |
| https://github.com/advisories/GHSA-4w5w-4fhm-q483 | advisory | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-2705 changed 2026-03-03 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-4w5w-4fhm-q483 changed 2026-07-13 | CC-BY-4.0 |
| NVD | CVE-2026-2705 changed 2026-06-17 | Public domain |
| PyPA Advisory Database | PYSEC-2026-2770 changed 2026-07-13 | CC-BY-4.0 |