# CVE-2026-68770: sentence-transformers Arbitrary Code Execution on Local Model Load Despite trust_remote_code=False

- Severity: Critical 9.3 (CVSS:4.0, scored by VulnCheck) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.65%, higher than 52% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-07-31T20:56:06.867Z
- Modified: 2026-11-08T14:08:16.653Z
- Also known as: GHSA-jhr6-gm9c-rqjv, PYSEC-2026-4164
- Weaknesses: CWE-94
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact total
- Assigned by: VulnCheck

## 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.

(As written by CVE List.)

## Affected

- Hugging Face sentence-transformers: up to 5.5.1
- sentence-transformers (PyPI): before 5.6.0

## Every score

- VulnCheck: CVSS:4.0 9.3 Critical `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`
- VulnCheck: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:4.0 Critical `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`
- PyPA Advisory Database: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- PyPA Advisory Database: CVSS:4.0 `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`

## References

- <https://github.com/huggingface/sentence-transformers/issues/3801> (exploit, issue-tracking, web)
- <https://github.com/huggingface/sentence-transformers/pull/3807> (patch, vendor-advisory, web)
- <https://github.com/huggingface/sentence-transformers> (package, product)
- <https://github.com/huggingface/sentence-transformers/commit/ae1acc3fb2aa2004577b297eb4a915ce7a03316a> (patch, web)
- <https://www.vulncheck.com/advisories/sentence-transformers-arbitrary-code-execution-on-local-model-load-despite-trust-remote-code-false> (third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-68770> (advisory)
- <https://github.com/huggingface/sentence-transformers/pull/3935> (web)
- <https://github.com/huggingface/sentence-transformers/commit/626eb602b088878a8173bcab69225f68411b99e1> (web)
- <https://github.com/huggingface/sentence-transformers/releases/tag/v5.6.0> (web)
- <https://github.com/huggingface/sentence-transformers/releases/tag/v6.0.0> (web)
- <https://pypi.org/project/sentence-transformers> (package)
- <https://github.com/advisories/GHSA-jhr6-gm9c-rqjv> (advisory)

## Sources

- CVE List: [CVE-2026-68770](https://www.cve.org/CVERecord?id=CVE-2026-68770), CVE Terms of Use, modified 2026-11-08
- GitHub Advisory Database: [GHSA-jhr6-gm9c-rqjv](https://github.com/advisories/GHSA-jhr6-gm9c-rqjv), CC-BY-4.0, modified 2026-10-01
- NVD: [CVE-2026-68770](https://nvd.nist.gov/vuln/detail/CVE-2026-68770), Public domain, modified 2026-10-23
- PyPA Advisory Database: [PYSEC-2026-4164](https://osv.dev/vulnerability/PYSEC-2026-4164), CC-BY-4.0, modified 2026-10-01

---

Page: https://cve.day/CVE-2026-68770 · Whole record: https://cve.day/CVE-2026-68770.json · Rebuilt by cve.day 2026-11-25T22:59:30.741Z
