Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-102567 Overview
CTranslate2 versions prior to 4.8.1 contain an out-of-bounds heap read vulnerability in the binary model loader. The flaw resides in the string deserialization routine within src/models/model.cc, where string fields lacking null terminators cause the parser to read past the allocated buffer. An attacker who convinces a user to load a crafted model file can trigger a crash or disclose adjacent heap memory contents. The issue is tracked under CWE-125: Out-of-bounds Read and was fixed in the OpenNMT CTranslate2 v4.8.1 release.
Critical Impact
Loading a malicious CTranslate2 model file can crash the host process or leak sensitive data from adjacent heap allocations, affecting inference pipelines that consume untrusted model artifacts.
Affected Products
- OpenNMT CTranslate2 versions prior to 4.8.1
- Applications embedding the CTranslate2 binary model loader
- Inference services that deserialize third-party CTranslate2 model files
Discovery Timeline
- 2026-09-29 - CVE-2026-102567 published to NVD
- 2026-09-30 - Last updated in NVD database
Technical Details for CVE-2026-102567
Vulnerability Analysis
CTranslate2 is a C++ inference engine for Transformer models maintained by OpenNMT. Model files use a compact binary format in which string fields are prefixed with a uint16_t length. The consume<std::string> template in src/models/model.cc reads the length, allocates a char buffer of exactly str_length bytes, and then constructs a std::string from that buffer using the single-argument constructor std::string(const char*). That constructor scans for a null terminator, which is not guaranteed to appear inside the allocated region. When no terminator exists, the read walks past the buffer into adjacent heap memory.
Root Cause
The defect combines two issues. First, the loader trusts the attacker-controlled length field without validating that it is non-zero. Second, it treats the deserialized bytes as a C-style null-terminated string despite the on-disk format not requiring termination. Either a zero length or a non-terminated payload causes the std::string constructor to dereference memory beyond the allocation.
Attack Vector
Exploitation requires the victim to open a malicious model file with a vulnerable version of CTranslate2. The attack is local and needs user interaction, but no privileges are required on the target process. Successful triggering can crash the inference process or leak heap contents that may include other model tensors, keys, or in-memory secrets from the same address space.
template<>
std::string consume(std::istream& in) {
const auto str_length = consume<uint16_t>(in);
+ if (str_length == 0)
+ throw std::runtime_error("Invalid string length in " + binary_file);
const auto c_str = consume<char>(in, str_length);
- std::string str(c_str);
+ std::string str(c_str, str_length - 1);
delete [] c_str;
return str;
}
Source: OpenNMT CTranslate2 commit d9b991e. The patch rejects zero-length strings and uses the length-bounded std::string constructor so the parser no longer relies on an in-buffer null byte.
Detection Methods for CVE-2026-102567
Indicators of Compromise
- Unexpected crashes or SIGSEGV signals in processes that load CTranslate2 models
- CTranslate2 model files from untrusted sources or unexpected origins in inference workflows
- AddressSanitizer or Valgrind reports of heap-buffer-overflow reads inside models::consume<std::string>
Detection Strategies
- Inventory installed CTranslate2 versions across build environments, containers, and ML inference hosts, flagging any release below 4.8.1
- Hash and track CTranslate2 model artifacts to detect files introduced from outside your model supply chain
- Run CTranslate2 workloads under sanitizer builds in staging to surface out-of-bounds reads during model onboarding
Monitoring Recommendations
- Alert on abnormal process termination for services embedding libctranslate2
- Monitor egress from inference servers for anomalous data flows that could indicate leaked heap contents
- Log all model file loads, including source path and SHA-256, for post-incident review
How to Mitigate CVE-2026-102567
Immediate Actions Required
- Upgrade CTranslate2 to version 4.8.1 or later across all environments that perform model deserialization
- Restrict model loading to files retrieved from trusted, integrity-verified repositories
- Rebuild and redeploy container images and Python wheels that bundle vulnerable CTranslate2 binaries
Patch Information
The fix landed in OpenNMT/CTranslate2 pull request #2068 and shipped in CTranslate2 v4.8.1. Additional context is available in the VulnCheck advisory.
Workarounds
- Do not load CTranslate2 model files from untrusted or unauthenticated sources until patched
- Enforce cryptographic signature verification on model artifacts before deserialization
- Isolate inference processes in sandboxed containers with minimal privileges to contain any memory disclosure
# Upgrade the Python bindings to a fixed release
pip install --upgrade 'ctranslate2>=4.8.1'
# Verify the installed version
python -c "import ctranslate2; print(ctranslate2.__version__)"
# Validate model integrity before load
sha256sum /path/to/model.bin
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

