---
title: "CVE-2026-68770: sentence-transformers local model loading bypasses trust_remote_code and executes custom Python"
url: https://erroneo.us/security/cve/CVE-2026-68770/
description: "CVE-2026-68770 (sentence-transformers (PyPI)): sentence-transformers contains a security control bypass vulnerability that allows attackers to achieve…"
type: vulnerability-record
section: "Security Digest"
date_published: 2026-07-31
date_modified: 2026-10-08
publisher: erroneo.us
author: erroneo.us Security Desk
cve: "CVE-2026-68770"
kev: false
cvss: 9.3
epss: 0.00909
license: All rights reserved. Quote with attribution and a link.
---

# CVE-2026-68770: sentence-transformers local model loading bypasses trust_remote_code and executes custom Python

**Signal:** Critical and remotely reachable. No known exploitation yet, but it is network-reachable without credentials. (Computed from CISA KEV, EPSS and CVSS; not an editorial verdict.)

## Should you act?

- Not in CISA KEV , but CISA’s SSVC assessment records a public proof-of-concept, so attack code exists.
- EPSS 0.9% , percentile 60: FIRST’s model estimates a 0.9% chance of exploitation activity in the next 30 days, higher than 60% of all scored CVEs (moderate). EPSS is a probability, not a verdict.
- Remotely reachable with no login and no user interaction. If the vulnerable service is exposed to the internet, prioritize it.
- Only applies if your dependency tree includes sentence-transformers (PyPI) < 5.6.0, fixed in 5.6.0 . Check your lockfile, including transitive dependencies.

## What it is

sentence-transformers contains a security control bypass vulnerability that allows attackers to achieve arbitrary code execution by exploiting a logic flaw in the importmoduleclass helper within sentencetransformers/util/misc.py, where the guard condition includes an 'or os.path.exists(modelnameorpath)' clause that satisfies the trust gate whenever the supplied path exists on the local filesystem, regardless of the trustremotecode=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, trustremotecode=False), bypassing the documented security contract and achieving code execution within the loading process.

## Affected packages

- PyPI `sentence-transformers` < 5.6.0 → fixed: 5.6.0

## Affected products (CVE record)

- Hugging Face sentence-transformers: <= 5.5.1

## Severity

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

## Exploitation

- CISA KEV: not listed (no confirmed in-the-wild exploitation known to CISA).
- CISA SSVC assessment: exploitation poc , automatable yes , technical impact total .
- FIRST EPSS (model of 2026-10-21): 0.91% probability of exploitation activity in the next 30 days; percentile 60.

## Sources

- [Pull Request](https://github.com/huggingface/sentence-transformers/pull/3807)
- [Patch Commit](https://github.com/huggingface/sentence-transformers/commit/ae1acc3fb2aa2004577b297eb4a915ce7a03316a)
- [GitHub Advisory GHSA-jhr6-gm9c-rqjv](https://github.com/advisories/GHSA-jhr6-gm9c-rqjv)
- [CVE.org record CVE-2026-68770](https://www.cve.org/CVERecord?id=CVE-2026-68770)
- [NVD entry CVE-2026-68770](https://nvd.nist.gov/vuln/detail/CVE-2026-68770)
- [GitHub Issue](https://github.com/huggingface/sentence-transformers/issues/3801)
- [Product Repository](https://github.com/huggingface/sentence-transformers)
- [vulncheck.com](https://www.vulncheck.com/advisories/sentence-transformers-arbitrary-code-execution-on-local-model-load-despite-trust-remote-code-false)
- [github.com](https://github.com/huggingface/sentence-transformers/pull/3935)
- [github.com](https://github.com/huggingface/sentence-transformers/commit/626eb602b088878a8173bcab69225f68411b99e1)
- [github.com](https://github.com/huggingface/sentence-transformers/releases/tag/v5.6.0)
- [github.com](https://github.com/huggingface/sentence-transformers/releases/tag/v6.0.0)

---
Source page: https://erroneo.us/security/cve/CVE-2026-68770/ · Security Digest: https://erroneo.us/security/ · More: https://erroneo.us/llms.txt
