GPU VulnDB

Database/AI/ML frameworks & serving

stable-diffusion.cpp: safetensors loader trusts data_offsets, reading process memory past the tensor data section

CVSS 6.9CVE-2026-70660AI/ML frameworks & servingcurated

Impact

The safetensors loader verified only that a tensor's declared nbytes equalled end - begin, never that the byte range stayed inside the file's data section. A crafted .safetensors file makes model_loader.cpp copy an attacker-chosen length from an unchecked offset in the mapped file, so loading the model pulls adjacent process memory into tensor buffers or crashes the loader. On a serving host that accepts user-supplied checkpoints or LoRAs, that means whatever else lives in the inference process address space - other tenants' prompts, API tokens, previously loaded weights - can be read back out through generated tensors, or the worker can be killed on demand. Exploitation requires getting a file in front of the loader, which is routine wherever operators let users bring their own models.

Who can reach it

Anyone who can place or upload a model file that the server loads - a tenant supplying a checkpoint, or a user downloading an untrusted model from a hub. No authentication to the library itself; the vector is the model file.

What to do

Upgrade to master-764-e22272e (commit e22272ee631b) or later and restart the serving processes; no node reboot is needed. Until then, load only checkpoints from sources you control and keep conversion/loading of untrusted files in a throwaway sandbox with no secrets in the address space.

References

Related entries

All AI/ML frameworks & serving entries

This entry is curated: imported from vendor advisories with machine assistance, not yet individually verified. Confirm against your vendor's advisory before acting, and report anything wrong.