CVE-2026-2705: 
Python vulnerability analysis and mitigation

Overview

CVE-2026-2705 is a NULL pointer dereference / out-of-bounds read vulnerability in Open Babel's MOL2 File Handler component, specifically in the OBAtom::SetFormalCharge function within src/formats/mol2format.cpp. It affects Open Babel versions up to and including 3.1.1. The vulnerability was reported via a GitHub issue on January 28, 2026, publicly disclosed on February 19, 2026, and a fix was merged into the upstream repository on May 9, 2026. It carries a CVSS v3.1 base score of 8.1 (High) (Red Hat Advisory, Red Hat Bugzilla).

Technical details

The root cause is a missing NULL pointer check in MOL2Format::ReadMolecule (mol2format.cpp, line 424). When parsing a malformed MOL2 file, mol.GetAtom(aid) can return NULL if the file contains an invalid or out-of-range atom ID — for example, an aid value of 0 or one exceeding the declared atom count. The code then unconditionally calls SetFormalCharge() on the returned pointer, causing a SEGV (write to address 0x28, a NULL+offset dereference). The vulnerability is classified as CWE-476 (NULL Pointer Dereference) and CWE-125 (Out-of-bounds Read). The fix adds a NULL check after GetAtom() and tightens the range validation to reject aid < 1 (GitHub Issue #2848, Patch Commit).

Impact

Successful exploitation can cause an application crash (denial of service) by triggering a NULL pointer dereference when Open Babel processes a malicious MOL2 file. Depending on memory layout, the out-of-bounds read condition may also expose sensitive data from adjacent memory regions, resulting in a high confidentiality impact. The vulnerability requires user interaction (opening or processing a crafted MOL2 file) but no authentication or special privileges, making it relevant to any workflow — including web services, cheminformatics pipelines, or desktop tools — that accept user-supplied molecular files (Red Hat Advisory, GitHub Issue #2848).

Exploitability

A public proof-of-concept reproducer file (repro.mol2) is available on GitHub and was submitted alongside the original bug report (PoC File, GitHub Issue #2848). The CVSS v4.0 exploit maturity is rated "Proof of Concept." There is no evidence of active in-the-wild exploitation or threat actor attribution at this time. The EPSS score is approximately 0.103% (low probability of exploitation in the near term). The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. Nessus plugin 299601 can detect affected systems (Tenable).

Exploitation steps

  1. Craft a malicious MOL2 file: Create a MOL2 file with a @UNITY_ATOM_ATTR section that references an invalid atom ID (e.g., aid = 0 or an ID exceeding the declared atom count in the @ATOM section). A public example reproducer is available at https://github.com/oneafter/0128/blob/main/ob2/repro.mol2.
  2. Deliver the file to the target: Distribute the malicious .mol2 file via email attachment, file upload to a web-based cheminformatics service, shared storage, or any other vector that causes a vulnerable Open Babel instance to process it.
  3. Trigger parsing: The target user or automated pipeline invokes Open Babel to convert or process the file (e.g., obabel -imol2 repro.mol2 -osmi -O /dev/null).
  4. Exploit the NULL dereference: During MOL2Format::ReadMolecule, mol.GetAtom(aid) returns NULL for the invalid atom ID. The code proceeds to call SetFormalCharge() on the NULL pointer, writing to address 0x28 (NULL + offset), causing a SEGV crash (denial of service) or potential memory disclosure (GitHub Issue #2848, Patch Commit).

Indicators of compromise

  • Process: Unexpected crash or segmentation fault of the obabel process or any application embedding the Open Babel library when processing MOL2 files; ASAN reports referencing OpenBabel::OBAtom::SetFormalCharge at atom.h:198 or mol2format.cpp:424.
  • Logs: Application error logs showing SEGV on unknown address 0x000000000028 or AddressSanitizer: SEGV with stack traces involving MOL2Format::ReadMolecule and OBAtom::SetFormalCharge.
  • File System: Presence of unexpected or externally sourced .mol2 files in directories processed by Open Babel, particularly files with malformed @UNITY_ATOM_ATTR sections containing out-of-range atom IDs.
  • Network: Unusual uploads of .mol2 files to web services or APIs backed by Open Babel, especially files with anomalous structure (mismatched atom counts, invalid IDs in charge sections) (GitHub Issue #2848).

Mitigation and workarounds

The fix is available as commit e23a224b8fd9d7c2a7cde9ef4ec6afb4c05aa08a, merged into the Open Babel master branch on May 9, 2026 (PR #2862). Organizations should upgrade Open Babel to a version built from the patched source beyond 3.1.1; Debian has also initiated packaging of openbabel 3.2.0+dfsg-1~exp which includes the fix. As a workaround, restrict MOL2 file processing to trusted sources only, implement input validation to reject files with malformed atom sections, and consider sandboxing Open Babel processes to limit crash impact. OpenSUSE has also issued a security update addressing this issue (GitHub PR #2862, OpenSUSE Advisory).

Community reactions

The upstream Open Babel project was slow to respond — the bug was reported on January 28, 2026, but the fix was not merged until May 9, 2026, with the sole maintainer (ghutchis) acknowledging the delay and noting "I guess I'm back to the lone maintainer." Red Hat tracked the issue via Bugzilla (Bug 2440890) and assigned it medium severity. The oss-security mailing list also carried a notification. No significant broader media coverage or notable researcher commentary beyond the original reporter and patch author has been identified (GitHub PR #2862, Red Hat Bugzilla, oss-security).

Additional resources

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

Debian

Affected

bookworm

openbabel

Affected

sid

openbabel

Affected

trixie

openbabel

Affected

Ubuntu

Unknown

bionic (esm-apps)

openbabel

Unknown

devel

openbabel

Unknown

focal (esm-apps)

openbabel

Unknown

jammy

openbabel

Unknown

jammy (esm-apps)

openbabel

Unknown

noble

openbabel

Unknown

noble (esm-apps)

openbabel

Unknown

resolute

openbabel

Unknown

Source: This report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-mpqx-q82w-9x46HIGH7.5
  • Python logoPython
  • graphql-core
NoYesOct 25, 2026
GHSA-4gm2-62xx-xwvxMEDIUM5.3
  • Python logoPython
  • aynops
NoYesOct 25, 2026
GHSA-jm75-qwf5-vg52MEDIUMN/A
  • Python logoPython
  • exmergo-dex-core
NoYesOct 25, 2026
GHSA-f3jf-cv9h-7c3gHIGHN/A
  • Python logoPython
  • exmergo-dex-core
NoYesOct 25, 2026
GHSA-28xv-9wpg-c42rHIGHN/A
  • Python logoPython
  • exmergo-dex-core
NoYesOct 25, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management