# CVE-2026-68770: sentence-transformers Arbitrary Code Execution on Local Model Load Despite trust\_remote\_code=False

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** CRITICAL 9.3
- **CVSS:** 9.3 (v4.0, CNA) `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`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Attack requirements: None; Privileges required: None; User interaction: None; Confidentiality impact: High; Integrity impact: High; Availability impact: High; Confidentiality impact on other systems: None; Integrity impact on other systems: None; Availability impact on other systems: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** Yes (see exploit references)
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.91% (percentile 58, 2026-11-28)
- **CWE:** CWE-94
- **Aliases:** GHSA-jhr6-gm9c-rqjv, PYSEC-2026-4164
- **Published:** 2026-07-31T20:56:06.867Z
- **Modified:** 2026-11-08T14:08:16.653Z

## Who should check

- Projects that depend on PyPI package sentence-transformers (\< 5.6.0)
- Anyone running Hugging Face sentence-transformers \<= 5.5.1

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

## Affected and fixed versions

- PyPI `sentence-transformers`: affected \< 5.6.0; fixed 5.6.0 (osv)
- Hugging Face sentence-transformers: \<= 5.5.1 (cvelist)

## Mitigation

- Upgrade sentence-transformers to 5.6.0 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-68770. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-68770.md
Affected: sentence-transformers < 5.6.0
Fixed in: 5.6.0

Steps:
1. Search this machine and project for sentence-transformers (PyPI), Hugging Face sentence-transformers: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-68770 being exploited?

There is no confirmed exploitation: CVE-2026-68770 is not in the CISA Known Exploited Vulnerabilities catalog. Public exploit code or a proof of concept is available. EPSS estimates a 0.91% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2026-68770?

Critical: CVSS 9.3 (v4.0, scored by CNA). Remote, no login needed.

### Which versions are affected by CVE-2026-68770?

sentence-transformers \< 5.6.0.

### Is there a fix for CVE-2026-68770?

Yes. Fixed in 5.6.0. Upgrade sentence-transformers to 5.6.0 or later.

### How do I check if I'm affected by CVE-2026-68770?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

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

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-68770>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-jhr6-gm9c-rqjv> (license: <https://creativecommons.org/licenses/by/4.0/>)
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/PYSEC-2026-4164> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2026-68770> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-68770>
