CVE-2026-68770
Description
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.
Weakness
- CWE-94: Improper Control of Generation of Code
CISA SSVC decision points
| Exploitation | poc |
|---|---|
| Automatable | yes |
| Technical impact | total |
| Scored | 2026-08-03 |
Timeline
- 2026-07-31Published by the CNA20:56 UTC
- 2026-07-31GitHub advisory published (GHSA-jhr6-gm9c-rqjv)same day
- 2026-08-03CISA SSVC decision recorded3 days after publication
Exploit and advisory records
GitHub advisory GHSA-jhr6-gm9c-rqjv, affected packages:
| Package | Vulnerable versions | Fixed in |
|---|---|---|
| PyPI sentence-transformers | before 5.6.0 | 5.6.0 |
Affected products
Products listed as vulnerable. Upgrade to the version under "Fixed in", or a later one.
| Product | Vulnerable versions | Fixed in |
|---|---|---|
| hugging_face sentence-transformers | from 0 through 5.5.1no fix listed | not listed |
| huggingface transformers | through 5.5.1no fix listed | not listed |
References
- https://github.com/huggingface/sentence-transformers/commit/ae1acc3fb2aa2004577b297eb4a915ce7a03316a
- https://github.com/huggingface/sentence-transformers/pull/3807
- https://github.com/huggingface/sentence-transformers
- https://github.com/huggingface/sentence-transformers/issues/3801
- https://www.vulncheck.com/advisories/sentence-transformers-arbitrary-code-execution-on-local-model-load-despite-trust-remote-code-false
Get more CVE data from the API.
curl 'https://api.contrastcyber.com/cve_lookup/CVE-2026-68770'curl 'https://api.contrastcyber.com/cve_risk_score/CVE-2026-68770'curl 'https://api.contrastcyber.com/cve_exploit/CVE-2026-68770'curl 'https://api.contrastcyber.com/cve_products/CVE-2026-68770'
Sources
- Vulnerability data from the National Vulnerability Database (NIST) and the CVE Program. CVE records: Copyright © 1999-2026, The MITRE Corporation, used under the CVE Program Terms of Use. CVE® is a registered trademark of The MITRE Corporation.
- CWE definitions: Copyright © 2006-2026, The MITRE Corporation, used under the CWE Terms of Use. CWE is a trademark of The MITRE Corporation.
- OWASP Top 10 categories by the OWASP Foundation (CC BY 3.0).
- EPSS scores by FIRST.org EPSS, used with attribution.
- KEV catalog and SSVC decisions by CISA.
- Advisory data from the GitHub Advisory Database through OSV.dev (CC BY 4.0).
- Exploit metadata from the Exploit Database (GPL-2.0-only, metadata only).
- Nuclei template names from nuclei-templates (MIT).