Security Control Bypass in SentenceTransformers by Hugging Face
CVE-2026-68770
9.3CRITICAL
What is CVE-2026-68770?
A security control bypass vulnerability in SentenceTransformers allows arbitrary code execution by exploiting a logic flaw in the import_module_class helper. This occurs when the guard condition improperly allows execution if the specified model path exists locally, disregarding the trust_remote_code=False argument. Attackers with the ability to affect model directory contents can place malicious Python files, enabling unauthorized code execution during model loading. Properly securing the local model directory is crucial to mitigate this risk.
Affected Version(s)
sentence-transformers 0 <= 5.5.1
