# CVE-2022-37331: Open Babel out-of-bounds write in Gaussian orientation parser

Source: https://junglewise.ai/threats/cve-2022-37331-open-babel-out-of-bounds-write-in-gaussian-orientation-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-37331 · Severity: high · CVSS 7.8 · Published 2026-07-01

Open Babel is a widely used chemistry software library for converting and reading molecular data files. A security flaw in its Gaussian file format parser allows a specially crafted file to cause a memory error. If a user or automated service opens a malicious file, an attacker could potentially execute unauthorized code or crash the application, impacting data integrity and system availability.

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

## Quick answers

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

**How severe is CVE-2022-37331?** 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-37331?** 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-37331 attacked?** It is attacked with local access, in a software library.

**Am I affected by CVE-2022-37331?** 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 write vulnerability (CWE-787/CWE-119) exists in Open Babel's Gaussian format orientation functionality, specifically within the 'coords_type' orientation parser. The flaw is triggered when the parser encounters a malformed orientation block in a Gaussian output file, causing it to write data past the end of the allocated destination buffer. The attack vector is local, requiring a user to open a malicious file using the 'obabel' CLI tool, the 'OBConversion' API, or any of the supported language bindings (Python, Ruby, Java, etc.). Successful exploitation can lead to arbitrary code execution or a denial-of-service condition. The issue was addressed in version 3.2.0 by replacing fixed-size buffers with C++ strings to ensure safe memory handling.

## Affected products

- Open Babel Open Babel <= 3.1.1
- pip openbabel < 3.2.0

## Identifiers

- CVE-2022-37331
- GHSA-vr3p-gg26-45v9
- PYSEC-2026-2793

## Timeline

- 2022-07-21: disclosed: Initial report by Cisco Talos
- 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-vr3p-gg26-45v9](https://github.com/openbabel/openbabel/security/advisories/GHSA-vr3p-gg26-45v9)
- [https://github.com/openbabel/openbabel/commit/528c142f](https://github.com/openbabel/openbabel/commit/528c142f)
- [https://talosintelligence.com/vulnerability_reports/TALOS-2022-1672](https://talosintelligence.com/vulnerability_reports/TALOS-2022-1672)
- [https://www.talosintelligence.com/vulnerability_reports/TALOS-2022-1672](https://www.talosintelligence.com/vulnerability_reports/TALOS-2022-1672)
- [https://api.github.com/repos/openbabel/openbabel/security-advisories/GHSA-vr3p-gg26-45v9](https://api.github.com/repos/openbabel/openbabel/security-advisories/GHSA-vr3p-gg26-45v9)

## 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 input parser](https://junglewise.ai/threats/cve-2022-46294-open-babel-out-of-bounds-write-in-mopac-input-parser)
- [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)
