CVE-2026-68770Hugging Face sentence-transformers
Critical 9.3 No auth needed
Follow: this CVE · Hugging Face · Hugging Face sentence-transformers We alert you by email or Slack (account required).
- Priority
- 71
- CVSS 4.0
- 9.3
- EPSS
- —
- Auth required
- No
- Published
- Jul 31, 2026
- Updated
- Oct 23, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-94
- SSVC (CISA)
- Exploitation: proof of concept · Automatable: yes · Technical impact: total
- Vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
What happens
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.
What to do
- Apply the vendor's security update for sentence-transformers.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| PyPI | sentence-transformers |
< 5.6.0 |
5.6.0 |
pip install "sentence-transformers>=5.6.0" |
| PyPI | sentence-transformers |
< 5.6.0 |
5.6.0 |
pip install "sentence-transformers>=5.6.0" |
Per OSV / GitHub Advisories (GHSA-jhr6-gm9c-rqjv, PYSEC-2026-4164). Check the version in your lockfile before upgrading.
Affected products
- Hugging Face · sentence-transformers
As reported by the CNA that published the CVE. NVD has not added CPEs with versions yet.
Official sources
References
Links published by the sources. Open them with care.