CVE-2026-2705: Open Babel MOL2 File atom.h SetFormalCharge out-of-bounds

Published Feb 19, 2026
·
Updated

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/fuzzregress/ and is exercised on every CI build under ASAN+UBSAN by the fuzzregresstest harness.

Credit

Reported by Vedant Madane (@VedantMadane) via VulDB.

Other sources

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.

— NVD

Affected Software

15 affected componentsFixes available
Open Babel Open Babel<=3.1.1
openbabel Open Babel<=3.1.1
pip/openbabel<3.2.0
3.2.0
debian/openbabel*
debian/openbabel*
debian/openbabel<3.2.0+dfsg-1
3.2.0+dfsg-1
debian/openbabel<=3.1.1+dfsg-9, <=3.1.1+dfsg-12
3.2.0+dfsg-2
ubuntu/openbabel*
ubuntu/openbabel*
ubuntu/openbabel*
ubuntu/openbabel*
ubuntu/openbabel*
ubuntu/openbabel*
ubuntu/openbabel*
ubuntu/openbabel*

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/openbabel to a version that resolves this vulnerability.

    Fixed in 3.2.0
  2. Upgrade

    Upgrade debian/openbabel to a version that resolves this vulnerability.

    Fixed in 3.2.0+dfsg-1
  3. Upgrade

    Upgrade debian/openbabel to a version that resolves this vulnerability.

    Fixed in 3.2.0+dfsg-2
  4. Upgrade

    Upgrade Open Babel to a version that resolves this vulnerability.

    Fixed in 3.2.0Patch e23a224b8fd9d7c2a7cde9ef4ec6afb4c05aa08a
  5. Compensating control

    Ensure systems using Open Babel (obabel CLI / OBConversion API / language bindings) do not parse untrusted MOL2 input; require only trusted MOL2 files before they are processed, since the attack can be launched remotely by opening a malicious MOL2 file.

Event History

Feb 19, 2026
CVE Published
via MITRE·05:02 AM
Data Sourced
via MITRE·05:02 AM
DescriptionSeverityWeakness
Data Sourced
via OSV·07:17 AM
DescriptionSeverityAffected Software
Data Sourced
via NVD·07:17 AM
DescriptionSeverityWeakness
Data Sourced
via NVD·08:12 PM
Affected Software
Updated
via NVD·08:12 PM
Severity
Mar 1, 2026
Event
via FIRST·12:00 AM
Updated
via MITRE·07:07 AM
DescriptionSeverity
Updated
via NVD·07:15 AM
Description
Event
via NVD·07:15 AM
Jun 30, 2026
Advisory Published
via GitHub·06:47 PM
Data Sourced
via GitHub·06:47 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-2705?

CVE-2026-2705 is considered a high-severity vulnerability due to its potential to cause out-of-bounds read conditions.

2

How do I fix CVE-2026-2705?

To fix CVE-2026-2705, upgrade Open Babel to version 3.1.2 or later.

3

What types of software are affected by CVE-2026-2705?

CVE-2026-2705 affects Open Babel software versions up to and including 3.1.1.

4

Can CVE-2026-2705 lead to data breaches?

Yes, CVE-2026-2705 can potentially lead to data breaches due to unauthorized access to sensitive information through out-of-bounds reads.

5

Is CVE-2026-2705 specific to any file types?

CVE-2026-2705 specifically impacts the MOL2 file handler within Open Babel.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203