# CVE-2022-46294: Open Babel out-of-bounds write in MOPAC input parser

Source: https://junglewise.ai/threats/cve-2022-46294-open-babel-out-of-bounds-write-in-mopac-input-parser  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-01. Updated: 2026-07-01  
License: CC BY 4.0 with a link back

CVE-2022-46294 · Severity: high · CVSS 7.8 · Published 2026-07-01

Open Babel is a widely used software library for converting and processing chemistry data files. A vulnerability in its MOPAC file parser allows a specially crafted file to cause a memory error when opened. This could lead to a program crash or potentially allow an attacker to execute unauthorized code on the system where the file is processed.

Technologies: [openbabel (PyPI)](https://junglewise.ai/threats/technologies/openbabel). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2022-46294 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2022-46294 being exploited in the wild.

**How severe is CVE-2022-46294?** High severity, with a CVSS score of 7.8, published 1 July 2026.

**Which products and versions are affected?** openbabel (PyPI) < 3.2.0, ECOSYSTEM:introduced=0,fixed=3.2.0.

**Is there a fix for CVE-2022-46294?** Yes. openbabel (PyPI): upgrade to 3.2.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2022-46294 attacked?** It is attacked with local access, in a software library.

**Am I affected by CVE-2022-46294?** Check whether you run openbabel (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- openbabel (PyPI): upgrade to 3.2.0 or later

  ```sh
  pip install "openbabel>=3.2.0"
  ```


## Technical details

An out-of-bounds (OOB) write vulnerability exists in the MOPAC input parser of Open Babel. The root cause is the use of a fixed-size array, `translationVectors[]`, which is designed to hold a maximum of three translation vectors. When parsing a malformed MOPAC file containing more than three Tv atoms, the parser continues to write data beyond the array's allocated memory. This memory corruption can be triggered via the `obabel` CLI tool, the `OBConversion` API, or any of the library's language bindings (Python, Java, etc.). Successful exploitation requires a user to open a malicious file and can lead to arbitrary code execution or a denial-of-service. The issue is addressed in version 3.2.0 by adding bounds checking to ensure no more than three vectors are written.

## Affected products

- Open Babel openbabel <= 3.1.1

## Identifiers

- CVE-2022-46294
- GHSA-mjmg-352j-f456
- PYSEC-2026-2786

## Timeline

- 2026-05-09: other: Fix commit authored
- 2026-05-26: patched: Version 3.2.0 released
- 2026-07-01: advisory: GitHub Advisory published

## References

- [https://github.com/openbabel/openbabel/security/advisories/GHSA-mjmg-352j-f456](https://github.com/openbabel/openbabel/security/advisories/GHSA-mjmg-352j-f456)
- [https://github.com/openbabel/openbabel/commit/40e852138f21d586b7ccdce6329e7b23a87168bb](https://github.com/openbabel/openbabel/commit/40e852138f21d586b7ccdce6329e7b23a87168bb)
- [https://talosintelligence.com/vulnerability_reports/TALOS-2022-1666](https://talosintelligence.com/vulnerability_reports/TALOS-2022-1666)
- [https://www.talosintelligence.com/vulnerability_reports/TALOS-2022-1666](https://www.talosintelligence.com/vulnerability_reports/TALOS-2022-1666)
- [https://api.github.com/repos/openbabel/openbabel/security-advisories/GHSA-mjmg-352j-f456](https://api.github.com/repos/openbabel/openbabel/security-advisories/GHSA-mjmg-352j-f456)

## Related threats

- [Open Babel out-of-bounds write in MOPAC output parser](https://junglewise.ai/threats/cve-2022-46292-open-babel-out-of-bounds-write-in-mopac-output-parser)
- [Open Babel out-of-bounds write in MSI parser translationVectors](https://junglewise.ai/threats/cve-2022-46295-open-babel-out-of-bounds-write-in-msi-parser-translationvectors)
- [Open Babel out-of-bounds write in MOPAC output parser](https://junglewise.ai/threats/cve-2022-46293-open-babel-out-of-bounds-write-in-mopac-output-parser)
- [Open Babel out-of-bounds write in Gaussian translationVectors](https://junglewise.ai/threats/cve-2022-46291-open-babel-out-of-bounds-write-in-gaussian-translationvectors)
- [Open Babel heap buffer overflow in ORCA nAtoms parser](https://junglewise.ai/threats/cve-2022-46290-open-babel-heap-buffer-overflow-in-orca-natoms-parser)
