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-112107 Overview
CVE-2026-112107 is a buffer overflow vulnerability in ztxz16 fastllm through version 1.8.2. The flaw resides in the SafeTensorItem::CreateBuffer function in src/model.cpp, part of the Safetensors Weight Loading component. Attackers can trigger the overflow by manipulating the data_offsets argument during model weight loading. The vulnerability is classified under CWE-119 (Improper Restriction of Operations within the Bounds of a Memory Buffer). A proof-of-concept exploit has been publicly released, and the upstream project has not responded to the issue report at time of disclosure.
Critical Impact
Loading an attacker-controlled Safetensors model file into a fastllm process can cause a buffer overflow, potentially leading to memory corruption and process compromise during AI model inference.
Affected Products
- ztxz16 fastllm versions up to and including 1.8.2
- Component: Safetensors Weight Loading (src/model.cpp)
- Function: SafeTensorItem::CreateBuffer
Discovery Timeline
- 2026-10-19 - CVE-2026-112107 published to NVD
- 2026-10-19 - Last updated in NVD database
Technical Details for CVE-2026-112107
Vulnerability Analysis
The vulnerability lives in SafeTensorItem::CreateBuffer within src/model.cpp of the fastllm project. fastllm is an inference engine that loads large language model weights from Safetensors files. During parsing, the loader reads a data_offsets field from the file header to determine buffer sizing and copy boundaries. The function does not adequately validate these offsets before allocating or writing to the resulting buffer. A crafted Safetensors file with manipulated data_offsets values triggers an out-of-bounds write in the process memory.
The issue is reachable whenever fastllm loads a Safetensors model from an untrusted source. Model files shared through hubs, mirrors, or shared storage can carry the malicious header. Because inference engines typically run in long-lived service processes, memory corruption inside the loader can disrupt the host service and may enable further exploitation depending on allocator behavior and surrounding code.
Root Cause
The root cause is missing bounds validation on the data_offsets values parsed from the Safetensors header. The loader trusts the attacker-supplied offsets and uses them directly in buffer sizing and memory operations, producing a classic [CWE-119] boundary violation.
Attack Vector
Exploitation requires an attacker to supply a crafted Safetensors weight file to a user or system that loads it with a vulnerable fastllm build. Delivery can occur through model repositories, downloaded checkpoints, or any workflow that imports third-party weights. User interaction is required to initiate the load. A public proof-of-concept archive is referenced from the vulnerability report. See the GitHub FastLLM Issue #758 and the VulDB CVE-2026-112107 entry for technical details.
Detection Methods for CVE-2026-112107
Indicators of Compromise
- Unexpected crashes or segmentation faults in fastllm processes shortly after loading a Safetensors model file
- Safetensors files with header data_offsets values exceeding the declared file size or tensor region
- Model files sourced from untrusted hubs, mirrors, or user uploads prior to a service crash
Detection Strategies
- Inventory hosts running fastllm and identify any version at or below 1.8.2
- Scan Safetensors files for malformed or out-of-range data_offsets entries before loading
- Monitor runtime telemetry for abnormal memory access patterns, aborts, or allocator errors in inference processes
Monitoring Recommendations
- Log all model-load events including file hash, source, and user context
- Alert on process crashes or restarts of inference workers correlated with new or untrusted model imports
- Capture core dumps from fastllm worker processes to triage suspected exploitation attempts
How to Mitigate CVE-2026-112107
Immediate Actions Required
- Restrict fastllm to loading Safetensors files from trusted, integrity-verified sources only
- Isolate inference services running vulnerable fastllm builds in sandboxed containers with least-privilege accounts
- Block ingestion of model files from unvetted external repositories until a fix is available
Patch Information
No vendor patch has been published at the time of writing. The upstream project was informed through GitHub FastLLM Issue #758 but has not responded. Track the GitHub FastLLM Repository for a corrected release and apply it immediately once available.
Workarounds
- Validate Safetensors headers out-of-band and reject files whose data_offsets exceed the physical file size or tensor region bounds
- Run fastllm under a non-privileged user inside a container with seccomp and read-only mounts to limit the impact of memory corruption
- Require cryptographic signature verification on model files before passing them to fastllm
# Example: pre-load validation of a Safetensors file using Python
# Reject files where any data_offsets value exceeds the file size.
python - <<'EOF'
import json, struct, sys
path = sys.argv[1]
with open(path, 'rb') as f:
header_len = struct.unpack('<Q', f.read(8))[0]
header = json.loads(f.read(header_len))
file_size = __import__('os').path.getsize(path)
data_region = file_size - 8 - header_len
for name, meta in header.items():
if name == '__metadata__':
continue
start, end = meta['data_offsets']
if start < 0 or end > data_region or start > end:
sys.exit(f'Reject: {name} has invalid data_offsets')
print('OK')
EOF
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

