CVE-2026-2705
JSON

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 packageVersionsReported by
Open Babel3.1.0, 3.1.1CVE List
openbabel (PyPI)before 3.2.0GitHub Advisory Database, PyPA Advisory Database
openbabel open_babelup to 3.1.1NVD

All scores

VulDB5.3medium CVSS:4.0CVSS: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
VulDB4.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L/E:P/RL:O/RC:C
VulDB4.3medium CVSS:3.0CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L/E:P/RL:O/RC:C
VulDB5.0medium CVSS:2.0AV:N/AC:L/Au:N/C:N/I:N/A:P/E:POC/RL:OF/RC:C
GitHub5.5low CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
GitHublow CVSS:4.0CVSS: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
NVD8.1high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H
PyPA Advisory Database5.5medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
PyPA Advisory DatabaseNot scored CVSS:4.0CVSS: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

CWE-119CWE-125CWE-476

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.

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.346651technical-description, third-party-advisory, vdb-entry, web
https://vuldb.com/?ctiid.346651permissions-required, signature, vdb-entry, web
https://vuldb.com/?submit.754379third-party-advisory, vdb-entry, web
https://github.com/openbabel/openbabel/issues/2848exploit, issue-tracking, web
https://github.com/openbabel/openbabel/pull/2862issue-tracking, patch, web
https://github.com/oneafter/0128/blob/main/ob2/repro.mol2exploit, web
https://github.com/VedantMadane/openbabel/commit/e23a224b8fd9d7c2a7cde9ef4ec6afb4c05aa08apatch, web
https://github.com/openbabel/openbabel/security/advisories/GHSA-4w5w-4fhm-q483web
https://nvd.nist.gov/vuln/detail/CVE-2026-2705advisory
https://github.com/openbabel/openbabelpackage
https://pypi.org/project/openbabelpackage
https://github.com/advisories/GHSA-4w5w-4fhm-q483advisory

Sources

SourceRecordLicence
CVE ListCVE-2026-2705 changed 2026-03-03CVE Terms of Use
GitHub Advisory DatabaseGHSA-4w5w-4fhm-q483 changed 2026-07-13CC-BY-4.0
NVDCVE-2026-2705 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2026-2770 changed 2026-07-13CC-BY-4.0