PT-2026-66862 · Pypi · 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 |
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.
Exploit
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