PT-2026-66862 · Hugging Face · Sentence-Transformers
CVSS v3.1
9.8
Critical
| Vector | AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
sentence-transformers contains a security control bypass vulnerability that allows attackers to achieve arbitrary code execution by exploiting a logic flaw in the import module class helper within sentence transformers/util/misc.py, where the guard condition includes an 'or os.path.exists(model name or path)' clause that satisfies the trust gate whenever the supplied path exists on the local filesystem, regardless of the trust remote code=False argument. Attackers who can control or influence the contents of a model directory on disk can place malicious Python files such as modeling *.py referenced via modules.json, causing the code to execute at import time when an application loads the model with SentenceTransformer(path, trust remote code=False), bypassing the documented security contract and achieving code execution within the loading process.
Fix
Code Injection
Found an issue in the description? Have something to add? Feel free to write us 👾
Weakness Enumeration
Related Identifiers
Affected Products
Sentence-Transformers