Pypi · Sentence-Transformers · CVE-2026-68770
**Name of the Vulnerable Software and Affected Versions**
sentence-transformers (affected versions not specified)
**Description**
A security control bypass exists due to a logic flaw in the `import module class` helper within `sentence transformers/util/misc.py`. The guard condition includes an `or os.path.exists(model name or path)` clause that satisfies the trust gate if the supplied path exists on the local filesystem, ignoring the `trust remote code=False` argument. This allows attackers who can influence the contents of a model directory on disk to place malicious Python files, such as `modeling *.py` referenced via `modules.json`. Consequently, arbitrary code is executed during the import process when an application loads the model using `SentenceTransformer(path, trust remote code=False)`, bypassing the intended security contract.
**Recommendations**
At the moment, there is no information about a newer version that contains a fix for this vulnerability.