CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2022-46292

CVE-2022-46292: Heap-Based Out-of-Bounds Write in Open Babel MOPAC Parser

Alon Barad
Alon Barad
Software Engineer

Jul 6, 2026·6 min read·13 visits

Executive Summary (TL;DR)

An out-of-bounds write vulnerability in Open Babel's MOPAC output parser allows remote attackers to execute arbitrary code or cause a crash via a malformed file with excessive translation vectors.

A critical heap-based out-of-bounds write vulnerability exists in Open Babel 3.1.1 and master commit 530dbfa3 within the parsing of Translation Vectors in the MOPAC output file format parser. By supplying a crafted MOPAC file containing more than three translation vector entries under the Unit Cell Translation block, an attacker can corrupt heap memory. This vulnerability can lead to arbitrary code execution or denial of service.

Vulnerability Overview

Open Babel is an open-source chemical toolbox designed for the translation, search, analysis, and storage of molecular modeling data. The tool parses a variety of solid-state and crystallographic formats, making it a critical component in scientific data pipelines. The software handles crystal lattice structures by storing their spatial translation vectors, which represent periodic boundary conditions.

The vulnerability resides in the parsing of translation vectors inside the MOPAC output file parser. This component is responsible for processing scientific output files generated by the MOPAC (Molecular Orbital Package) semi-empirical quantum chemistry program. The file parser exposes an attack surface when processing untrusted molecular data.

Specifically, the vulnerability belongs to the heap-based out-of-bounds write class (CWE-787). An attacker can trigger this flaw by submitting a malformed MOPAC output file containing an excessive number of translation vectors. The parsing process fails to restrict the written indexes, leading to memory corruption and potential system takeover.

Root Cause Analysis

In crystallographic modeling, three-dimensional unit cells are defined by a maximum of three lattice translation vectors, traditionally labeled as a, b, and c. To store these properties, the developers of Open Babel defined a static array of three vector3 structures, named translationVectors. The state of the parsing process tracks the number of currently processed vectors through the integer counter numTranslationVectors.

The parser in src/formats/mopacformat.cpp processes lines sequentially within the UNIT CELL TRANSLATION block. When it encounters a row designated as a translation vector, it parses the three-dimensional floating-point coordinates and assigns them to the index pointed to by the numTranslationVectors counter. After assignment, the counter is incremented.

Because the parser does not implement a check on the value of numTranslationVectors before executing the write operation, it can increment the index beyond the bounds of the array. If the input file declares four or more translation vectors, the assignment targets index positions greater than or equal to 3. This leads to an out-of-bounds write into adjacent heap-allocated variables or internal object structures.

Code Analysis

The vulnerable version of the code in MOPACFormat::ReadMolecule lacks any validation check on the vector index before writing. The program reads coordinate strings, converts them using the standard library atof function, and directly modifies the array structure:

x = atof((char*)vs[2].c_str());
y = atof((char*)vs[3].c_str());
z = atof((char*)vs[4].c_str());
 
// Vulnerable write operation without index boundary validation
translationVectors[numTranslationVectors++].Set(x, y, z);

The fix committed in patch 40e852138f21d586b7ccdce6329e7b23a87168bb introduces an explicit conditional check that prevents memory modification beyond the allocated boundary. The comparison limits the execution of the storage function to cases where the index is strictly less than 3:

x = atof((char*)vs[2].c_str());
y = atof((char*)vs[3].c_str());
z = atof((char*)vs[4].c_str());
 
// Patched logic incorporating index safety validation
if (numTranslationVectors < 3)
  translationVectors[numTranslationVectors++].Set(x, y, z);

Although the patch resolves the primary heap-based write issue, the parsing mechanism still displays vulnerabilities to out-of-bounds vector reads if the input line is malformed. If the tokenized vector vs contains fewer than five elements, accessing indices 2, 3, and 4 causes undefined behavior or a null-pointer dereference inside std::vector functions. Security teams must ensure that input files are validated for structural integrity prior to passing them to the parser logic.

Exploitation Methodology

To exploit this vulnerability, an attacker must construct a malformed MOPAC output file (.out) containing a UNIT CELL TRANSLATION section. The attacker appends four or more vector declarations within this block, exceeding the physical constraints of a three-dimensional model. This forces the parser to write coordinate values beyond the boundaries of the statically allocated three-element array.

The exploitation flow depends on the memory layout of the target system. Because the object holding translationVectors resides on the heap, successive writes overwrite contiguous heap memory fields. These fields can include virtual table pointers, object pointers, or structural parsing metadata associated with the active OBFormat instance.

By carefully tuning the coordinate floating-point values, an attacker can overwrite these pointers with shellcode addresses or addresses of existing system functions. The attack requires user interaction or an automated backend processing pipeline to open the file. For example, a web application that offers online chemical format conversions could trigger this vulnerability when processing an uploaded file, executing the payload in the context of the daemon process.

Impact Assessment

The security consequences of CVE-2022-46292 depend on the environment where the Open Babel library is deployed. When integrated into web-based file-conversion servers, cloud computing clusters, or scientific repositories, the vulnerability allows remote code execution without authentication. The attack vector is classified as network-based if the application processes uploads automatically.

If the library is executed as a command-line tool on a workstation, the vulnerability behaves as a local exploit requiring user interaction. The victim must open the malicious file locally, leading to code execution with the permissions of the local user account. If the local user possesses elevated permissions, the entire workstation may be compromised.

The severity of this flaw is reflected in its CVSS score of 9.8 from the NVD and 7.8 from the OSV database. The vulnerability results in a total loss of confidentiality, integrity, and availability. Because Open Babel does not sandbox file parsing by default, a compromise allows arbitrary file access, local network probing, or remote shell spawning.

Remediation and Mitigation Guidance

The primary remediation strategy is upgrading Open Babel to a version that includes the safety check in the translation vector parsing loop. Users who compile the application from source must apply the fix from commit 40e852138f21d586b7ccdce6329e7b23a87168bb or fetch the latest master branch. Pre-compiled binaries distributed by operating systems must be updated via their respective package managers.

When immediate updates are not possible, administrators can implement workarounds to reduce exposure. Since the vulnerability is triggered by parsing specific crystallographic headers, automated ingress validation can scan incoming files. Deploying the YARA rule provided in this report on file upload endpoints can block malformed files before they reach the parser.

Additionally, organizations should run Open Babel inside restricted, low-privilege execution containers. Restricting network access for the conversion process reduces the risk of reverse shell payloads executing successfully. Implementing standard memory-safety hardening mechanisms, such as address space layout randomization (ASLR) and data execution prevention (DEP), raises the barrier for reliable exploitation.

Official Patches

Open BabelFix 5 CVE-2022 OOB writes in translationVectors[] across formats

Fix Analysis (1)

Technical Appendix

CVSS Score
9.8/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS Probability
0.82%
Top 47% most exploited

Affected Systems

Open Babel

Affected Versions Detail

Product
Affected Versions
Fixed Version
Open Babel
Open Babel
<= 3.1.1Commit 40e852138f21d586b7ccdce6329e7b23a87168bb
AttributeDetail
CWE IDCWE-787 / CWE-119
Attack VectorNetwork / Local
CVSS v3.1 Score9.8 (NVD) / 7.8 (OSV)
EPSS Score0.00816 (Percentile: 52.66%)
ImpactArbitrary Code Execution / Denial of Service
Exploit StatusProof-of-Concept Available
CISA KEV StatusNot Listed

MITRE ATT&CK Mapping

T1203Exploitation for Client Execution
Execution
T1068Exploitation for Privilege Escalation
Privilege Escalation
CWE-787
Out-of-bounds Write

The software writes data past the end, or before the beginning, of the intended buffer, leading to memory corruption, denial of service, or code execution.

Vulnerability Timeline

Vulnerability discovered by Claudio Bozzato of Cisco Talos
2022-12-01
Official fix committed to Open Babel GitHub repository
2026-05-09
Vulnerability published to NVD and CVE.org
2023-07-21

References & Sources

  • [1]Cisco Talos Vulnerability Report (TALOS-2022-1666)
  • [2]Open Babel Git Repository
  • [3]CVE.org Official Entry

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•38 minutes ago•GHSA-HJWH-XVFW-QRWJ
5.5

GHSA-HJWH-XVFW-QRWJ: Credential Disclosure via Diagnostic Boundaries in mcp-searxng

A credential disclosure vulnerability in the mcp-searxng NPM package prior to version 1.12.0 allows attackers to recover plain-text SearXNG Basic Authentication credentials. The application exposes these credentials via console logs (stderr), MCP logging notifications, validation error messages, and JSON-RPC error responses. This occurs because the application lacks comprehensive sanitization across diagnostic boundaries when credentials are parsed from the SEARXNG_URL environment variable.

Amit Schendel
Amit Schendel
0 views•6 min read
•about 3 hours ago•CVE-2026-61711
5.3

CVE-2026-61711: Sandbox Escape via Protobuf SecurityMode Enum Validation Bypass in Moby BuildKit

A detailed technical analysis of CVE-2026-61711, an input validation flaw in Moby BuildKit prior to version 0.31.1. The flaw allows unauthorized or custom frontends to construct build execution environments where Seccomp and AppArmor configurations are completely disabled by supplying an invalid protobuf enum index, resulting in an elevated kernel-level attack surface inside the build sandbox.

Amit Schendel
Amit Schendel
4 views•4 min read
•about 4 hours ago•CVE-2026-61712
2.3

CVE-2026-61712: Denial of Service via Unbounded Resource Allocation in moby/buildkit

moby/buildkit is susceptible to a denial-of-service vulnerability prior to version 0.31.1. When BuildKit processes user or group directives from untrusted build contexts or base images, it reads configuration databases such as /etc/passwd and /etc/group directly into memory without enforcing boundaries. An attacker can exploit this behavior by engineering malicious files that trigger host memory exhaustion or block daemon threads indefinitely.

Alon Barad
Alon Barad
2 views•7 min read
•about 5 hours ago•CVE-2026-59992
5.4

CVE-2026-59992: Broken Access Control and Path Traversal in Tina CMS Production Media Adapters

CVE-2026-59992 is a critical broken access control vulnerability in the first-party production media adapters of Tina CMS, including next-tinacms-s3, next-tinacms-dos, next-tinacms-azure, and next-tinacms-cloudinary. The issue allows authenticated editors to escape the configured mediaRoot directory containment, facilitating unauthorized file uploads, modifications, and deletions across the entire storage bucket or container.

Amit Schendel
Amit Schendel
2 views•6 min read
•about 6 hours ago•CVE-2026-63123
6.5

CVE-2026-63123: Cross-Site Request Forgery leading to Cross-Origin Arbitrary File Write in @tinacms/cli

A Cross-Site Request Forgery (CSRF) vulnerability in the local development server of @tinacms/cli allowed malicious cross-origin pages to send state-changing HTTP requests. This issue permitted attackers to write arbitrary files into a developer's project directory or manipulate search and GraphQL indices without authorization.

Amit Schendel
Amit Schendel
5 views•4 min read
•about 7 hours ago•CVE-2026-63188
8.7

CVE-2026-63188: Unauthenticated Directory Traversal in @logto/tunnel

A high-severity path traversal vulnerability exists in the @logto/tunnel npm package (part of the Logto repository) prior to version 0.3.9. Remote unauthenticated attackers can exploit this vulnerability to read arbitrary local files by sending crafted HTTP requests with directory traversal sequences when the static file proxy is active.

Alon Barad
Alon Barad
5 views•7 min read