CVE-2026-68770 json
sentence-transformers Arbitrary Code Execution on Local Model Load Despite trust_remote_code=False
published 3mo ago modified 3d ago also EUVD-2026-51650 , GHSA-jhr6-gm9c-rqjv , PYSEC-2026-4164
- cvss
- 9.8
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.9%
- EPSS 0.9% chance of exploitation in 30 days, percentile 60%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- pypi sentence-transformers 5.6.0
- github.com/huggingface/sentence-transformers@ae1acc3 commit
- github.com/huggingface/sentence-transformers@626eb60 commit
- github.com/huggingface/sentence-transformers#3807 pull request
- github.com/huggingface/sentence-transformers#3935 pull request
- github.com/huggingface/sentence-transformers/releases/tag/v5.6.0 release
- github.com/huggingface/sentence-transformers/releases/tag/v6.0.0 release
Is CVE-2026-68770 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerVendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2026-68770 updated cvss 7.4
sentence-transformers: sentence-transformers: Remote Code Execution via Security Control Bypass
-
Red Hat Lightspeed Core lightspeed-core/rag-tool-cpu-rhel9, lightspeed-core/lightspeed-stack-rhel9, lightspeed-core/rag-tool-cuda-12.9-rhel9 Red Hat OpenShift Lightspeed openshift-lightspeed/lightspeed-service-api-rhel9affected: workaround, no fix available
-
Red Hat Ansible Automation Platform 2 ansible-automation-platform-25/lightspeed-chatbot-rhel8, ansible-automation-platform-26/lightspeed-chatbot-rhel9, ansible-automation-platform-27/lightspeed-chatbot-rhel9affected: workaround, no fix planned “Will not fix”
-
Red Hat Enterprise Linux AI (RHEL AI) 3 rhelai3/bootc-cuda-rhel9, rhelai3/bootc-rocm-rhel9, rhelai3/bootc-gaudi-rhel9, rhelai3/disk-image-cuda-rhel9affected: workaround, no fix available, no fix planned “Will not fix”
-
Red Hat OpenShift AI (RHOAI) rhoai/odh-openvino-model-server-rhel9affected: workaround, no fix available
-
Red Hat OpenShift AI 2.25 rhoai/odh-caikit-nlp-rhel9 1791448212fixed: vendor fix RHSA-2026:87410
-
Red Hat OpenShift AI 3.3 rhoai/odh-trustyai-nemo-guardrails-server-rhel9 1789570674fixed: vendor fix RHSA-2026:73987
-
Red Hat OpenShift AI 3.4 rhoai/odh-trustyai-nemo-guardrails-server-rhel9 1791556128fixed: vendor fix RHSA-2026:84734
-
Red Hat OpenShift Lightspeed openshift-lightspeed/lightspeed-ocp-rag-rhel9, openshift-lightspeed-tech-preview/lightspeed-rag-tool-rhel9 Red Hat OpenShift AI (RHOAI) rhoai/odh-llama-stack-core-rhel9, rhoai/odh-caikit-tgis-serving-rhel9not affected: vulnerable code not in execute path
show 1 moreshow fewer
-
Red Hat OpenShift AI 2.25 rhoai/odh-rhel9-operator 1792570619, rhoai/odh-vllm-cpu-rhel9 1792018436, rhoai/odh-dashboard-rhel9 1791853525, rhoai/odh-modelmesh-rhel9 1790881700, rhoai/odh-operator-bundle 1792571069, rhoai/odh-vllm-cuda-rhel9 1791358976, +65 more Red Hat OpenShift AI 3.3 rhoai/odh-cli-rhel9 1790070206, rhoai/rhai-cli-rhel9 1790070206, rhoai/odh-mlflow-rhel9 1789653606, rhoai/odh-trainer-rhel9 1790136369, rhoai/odh-maas-api-rhel9 1790131842, rhoai/odh-mlserver-rhel9 1789121365, +76 more Red Hat OpenShift AI 3.4 rhoai/odh-cli-rhel9 1791509689, rhoai/rhai-cli-rhel9 1791509689, rhoai/odh-automl-rhel9 1791535789, rhoai/odh-mlflow-rhel9 1791865967, rhoai/odh-autorag-rhel9 1791557539, rhoai/odh-trainer-rhel9 1791869783, +99 morenot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- yes
- Technical impact
- total
- Assessed
- 3mo ago
Exploit prediction
0.91% chance of exploitation in the next 30 days, higher than 60% of all scored CVEs (FIRST EPSS, 2026-11-11).
Exploits and checks
- github.com https://github.com/huggingface/sentence-transformers/issues/3801 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 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 |
| CNA | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| GitHub | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| CNA | 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/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 |
| OSV | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | sentence-transformers | <5.6.0 |
5.6.0 |
Affected products
- Hugging Face sentence-transformers
Classification
- Weakness
-
- CWE-94 Improper Control of Generation of Code
References
-
github.com
/huggingface/sentence-transformers/pull/3807
vendor-advisory, patch, web
-
github.com
/huggingface/sentence-transformers/commit/ae1acc3fb2aa2004577b297eb4a915ce7a03316a
patch, web
-
github.com
/huggingface/sentence-transformers/pull/3935
web
-
github.com
/huggingface/sentence-transformers/commit/626eb602b088878a8173bcab69225f68411b99e1
web
-
github.com
/huggingface/sentence-transformers/issues/3801
issue-tracking, exploit, web
-
github.com
/huggingface/sentence-transformers
product, package
-
vulncheck.com
/advisories/sentence-transformers-arbitrary-code-execution-on-local-model-load-despite-trust-remote-code-false
third-party-advisory, web
-
nvd.nist.gov
/vuln/detail/CVE-2026-68770
advisory
-
github.com
/huggingface/sentence-transformers/releases/tag/v5.6.0
web
-
github.com
/huggingface/sentence-transformers/releases/tag/v6.0.0
web
-
pypi.org
/project/sentence-transformers
package
-
github.com
/advisories/GHSA-jhr6-gm9c-rqjv
advisory
Sources
- CVE List CVE-2026-68770
- GitHub Advisory GHSA-jhr6-gm9c-rqjv
- NVD CVE-2026-68770
- OSV PYSEC-2026-4164
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.