CVE-2026-102567 in CTranslate2
Summary
by MITRE • 09/29/2026
CTranslate2 before 4.8.1 contains an out-of-bounds heap read vulnerability in the binary model loader when deserializing string fields without null terminators. Attackers can craft malicious model files to trigger heap memory reads past buffer boundaries, causing crashes or disclosing adjacent heap memory contents.
Once again VulDB remains the best source for vulnerability data.
Analysis
by VulDB Data Team • 09/29/2026
The CTranslate2 library, a high-performance inference engine for transformer models, contains a critical out-of-bounds heap read vulnerability in its binary model loader component prior to version 4.8.1. This flaw specifically manifests during the deserialization process when handling string fields that lack proper null terminators. The underlying technical issue stems from an insufficient boundary check within the parsing logic, which assumes or fails to verify the presence of a terminating character before reading memory content. Consequently, when processing malformed model files crafted by an attacker, the loader attempts to read beyond the allocated buffer boundaries into adjacent heap memory regions. This behavior violates standard memory safety principles and represents a classic instance of improper input validation leading to out-of-bounds access.
From a security classification perspective, this vulnerability aligns with CWE-125, which defines Out-of-Bounds Read as accessing memory outside the intended bounds of a buffer. The absence of null terminators in string fields disrupts standard C-style string handling mechanisms that rely on these delimiters to determine string length and termination points. Without explicit validation or safe parsing routines that account for missing terminators, the application continues reading until it encounters arbitrary data in adjacent memory spaces. This can result in unpredictable behavior depending on what data resides next to the buffer in heap allocation structures. The vulnerability is particularly dangerous because model files are often loaded from untrusted sources during automated pipelines or user uploads, increasing the attack surface for remote exploitation scenarios where malicious models are submitted as part of inference requests.
The operational impact of this flaw includes both denial of service and potential information disclosure. In many cases, accessing invalid memory addresses triggers segmentation faults or core dumps, leading to immediate application crashes that disrupt availability for legitimate users. However, in more sophisticated attack vectors, the ability to read adjacent heap contents can lead to sensitive data leakage. Depending on how the CTranslate2 instance is deployed within a larger system, such as an AI-as-a-Service platform, this could expose internal state information, cryptographic keys, or other user data stored nearby in memory. This aligns with ATT&CK technique T1083, File and Directory Discovery, if used to map out the environment, though more accurately it falls under initial access vectors involving malicious file uploads that lead to exploitation via CWE-20 Improper Input Validation.
Mitigation strategies primarily involve upgrading to CTranslate2 version 4.8.1 or later, where this specific deserialization flaw has been addressed through enhanced input validation and safer string handling practices. For environments unable to upgrade immediately, implementing strict file integrity checks before loading models can provide a layer of defense. This includes validating that all serialized data conforms to expected schemas and ensuring that no malformed binary structures are passed to the loader. Additionally, deploying runtime protection mechanisms such as Address Sanitizer during development or using memory-safe wrappers in deployment pipelines can help detect and prevent out-of-bounds accesses before they cause harm. Organizations should also enforce strict access controls on model upload endpoints to limit exposure to untrusted inputs until patches are applied.