Get a Demo

Let's Patch It!

Book a short call with one our specialists, we'll walk you through how Endor Patches work, and ask you a few questions about your environment (like your primary programming languages and repository management). We'll also send you an email right after you fill out the form, feel free to reply with any questions you have in advance!

CVE

CVE-2026-68770

sentence-transformers Arbitrary Code Execution on Local Model Load Despite trust_remote_code=False
Back to all
CVE

CVE-2026-68770

sentence-transformers Arbitrary Code Execution on Local Model Load Despite trust_remote_code=False

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, trustremote_code=False), bypassing the documented security contract and achieving code execution within the loading process.

Package Versions Affected

Package Version
patch Availability
No items found.

Automatically patch vulnerabilities without upgrading

Fix Without Upgrading
Detect compatible fix
Apply safe remediation
Fix with a single pull request

CVSS Version

Severity
Base Score
CVSS Version
Score Vector
C
H
U
9.3
-
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/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
C
H
U
0
-
C
H
U
-

Related Resources

No items found.

References

https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/68xxx/CVE-2026-68770.json, https://github.com/huggingface/sentence-transformers/pull/3807, https://nvd.nist.gov/vuln/detail/CVE-2026-68770, https://www.vulncheck.com/advisories/sentence-transformers-arbitrary-code-execution-on-local-model-load-despite-trust-remote-code-false, https://github.com/huggingface/sentence-transformers/issues/3801, https://github.com/huggingface/sentence-transformers/commit/ae1acc3fb2aa2004577b297eb4a915ce7a03316a, https://github.com/huggingface/sentence-transformers

Severity

0

CVSS Score
0
10

Basic Information

Base CVSS
0
EPSS Probability
0.00521%
EPSS Percentile
0.42357%
Introduced Version
0
Fix Available
ae1acc3fb2aa2004577b297eb4a915ce7a03316a

Fix Critical Vulnerabilities Instantly

Secure your app without upgrading.
Fix Without Upgrading