sentence-transformers Arbitrary Code Execution on Local Model Load Despite trust_remote_code=False
Hugging Face · sentence-transformers
9.3CriticalCVSS 4.0
Recommended action
Within 72 hours
Critical technical impact with a remotely reachable, unauthenticated path and a public exploit reference; no CISA KEV confirmation is currently recorded.
These OSV and GitHub advisory ranges apply only to the named package and ecosystem. A listed fixed version is not a universal product patch or proof that an update is installed.
Structured product status and remediation from the issuing vendor. Product-state explanations are always visible; large lists can be searched or downloaded.
1 current
CVE-2026-68770 · CSAF 2.0 · revision 3 · finalRed Hat Product Securitysentence-transformers: sentence-transformers: Remote Code Execution via Security Control Bypass
13 known affected
The vendor explicitly identifies these products as affected by this CVE.
lightspeed-core/lightspeed-stack-rhel9 as a component of Lightspeed Core
lightspeed-core/rag-tool-cpu-rhel9 as a component of Lightspeed Core
lightspeed-core/rag-tool-cuda-12.9-rhel9 as a component of Lightspeed Core
openshift-lightspeed/lightspeed-service-api-rhel9 as a component of OpenShift Lightspeed
ansible-automation-platform-25/lightspeed-chatbot-rhel8 as a component of Red Hat Ansible Automation Platform 2
ansible-automation-platform-26/lightspeed-chatbot-rhel9 as a component of Red Hat Ansible Automation Platform 2
ansible-automation-platform-27/lightspeed-chatbot-rhel9 as a component of Red Hat Ansible Automation Platform 2
rhelai3/bootc-cuda-rhel9 as a component of Red Hat Enterprise Linux AI (RHEL AI) 3
rhelai3/bootc-gaudi-rhel9 as a component of Red Hat Enterprise Linux AI (RHEL AI) 3
rhelai3/bootc-rocm-rhel9 as a component of Red Hat Enterprise Linux AI (RHEL AI) 3
rhelai3/disk-image-cuda-rhel9 as a component of Red Hat Enterprise Linux AI (RHEL AI) 3
rhoai/odh-caikit-nlp-rhel9 as a component of Red Hat OpenShift AI (RHOAI)
Summary
A flaw was found in sentence-transformers. A remote attacker could exploit a logic flaw to bypass a security control designed to prevent the execution of untrusted code. This vulnerability allows for arbitrary code execution when an application loads a model from a directory that has been influenced by the attacker, even if the `trust_remote_code=False` setting is enabled. This could lead to unauthorized code being run on the system.
Remediation
For Red Hat OpenShift AI 3.3.7 see the following documentation, which will be updated shortly for this release, for important instructions on how to upgrade your cluster and fully apply this errata update: https://docs.redhat.com/en/documentation/red_hat_openshift_ai/
Optional official sources
National CERT insights ?CERT means Computer Emergency Response Team; CSIRT is the closely related term Computer Security Incident Response Team.
Choose official national sources for this report. Each advisory shows its original language. Your selection is remembered on this device and included in shared links.
Official European source
ENISA European Vulnerability Database
Official EUVD identifiers, advisory evidence and known-exploited context. Missing fields are not treated as evidence of low risk.
1 current
ENISA EUVD identifier
EUVD-2026-51650
No EUVD known-exploited evidence
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.
EUVD state
Present in the current official mapping
Known exploitation
Not present in the current ENISA EUVD known-exploited dataset. This is not proof of no exploitation.
ENISA score
9.3 · CVSS 4.0
Advisory evidence
No linked advisory details stored yet
Recommended actionWithin 72 hours
Critical technical impact with a remotely reachable, unauthenticated path and a public exploit reference; no CISA KEV confirmation is currently recorded.
Patch available
01
What, why and how
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.
What
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.
Why
Untrusted data can cross into a code-evaluation path and be interpreted as executable instructions.
How
An attacker operating through a network path may attempt exploitation without authentication or user interaction. If successful, the issue may execute code or commands in the affected security context.
What
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.
Why
Untrusted data can cross into a code-evaluation path and be interpreted as executable instructions.
How
An attacker operating through a network path may attempt exploitation without authentication or user interaction. If successful, the issue may execute code or commands in the affected security context.
02
Exploit reality and attack path
CVSS severity, EPSS forecast probability, public exploit material and CISA-confirmed exploitation are separate signals.
Observed exploitation ?Confirmed exploitation and public exploit material are separate signals. Attacks can occur without public proof-of-concept or exploit code.No confirmed evidence
No CISA KEV match was present at the last successful refresh. This means no confirmation from that source, not proof of no exploitation.
Public PoC / exploit material ?Confirmed exploitation and public exploit material are separate signals. Attacks can occur without public proof-of-concept or exploit code.Reference recorded
CISA Vulnrichment records proof-of-concept exploitation in its SSVC data. BlackTree has not independently executed or validated exploit material.
Likely attack path
a network path → Improper Control of Generation of Code ('Code Injection') → execute code or commands in the affected security context
Attack surface
Network
Privileges required
None: unauthenticated exploitation is possible
User interaction
None
Attack complexity
Low: no specialised conditions are recorded
Security boundary
Not a CVSS 4.0 base metric
Weakness ?CWE means Common Weakness Enumeration: a standard category for the underlying weakness.
CWE-94: Improper Control of Generation of Code ('Code Injection'). The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.
CVSS vector ?CVSS means Common Vulnerability Scoring System. The vector records the metric values used to calculate technical severity.
Common Vulnerability Scoring System 4.0: the compact vector below is decoded into plain language.
AVNetworkAttack vector: The vulnerable component can be reached over a network.ACLowAttack complexity: No specialised conditions are required beyond attacker-controlled input.ATNoneAttack requirements: No additional deployment or execution condition is required.PRNonePrivileges required: The attacker does not need an account or existing privileges.UINoneUser interaction: No action by another user is required.VCHighVulnerable-system confidentiality: A successful attack can cause a major loss.VIHighVulnerable-system integrity: A successful attack can cause a major loss.VAHighVulnerable-system availability: A successful attack can cause a major loss.SCNoneSubsequent-system confidentiality: No direct loss is represented by this metric.SINoneSubsequent-system integrity: No direct loss is represented by this metric.SANoneSubsequent-system availability: No direct loss is represented by this metric.
Post-exploitation / living off the land
After compromise, an attacker may use built-in shells, scripting engines, scheduled tasks and native network utilities for discovery, persistence or movement. This is a plausible LoTL path, not evidence that it has occurred for every attack.
Only matched European and national findings are included. Language selectors and unavailable sources are omitted.
ENISA EUVD · EUVD-2026-51650Official EUVD mapping
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.
Official EUVD record ↗Cyber Security Agency of Singapore · English · CSA-SB-20260805Security Bulletin 5 Aug 2026
The Cyber Security Agency of Singapore included this CVE in its official Security Bulletin 5 Aug 2026, published on 5 August 2026. Open the linked bulletin for the product, severity and reference information published in that issue.
Operational remediation based on structured source evidence.
Status ?Patch availability is based on structured fixed-version fields and authoritative update references. If no fix is verified, check the vendor advisory before making a change.
For Red Hat OpenShift AI 3.3.7 see the following documentation, which will be updated shortly for this release, for important instructions on how to upgrade your cluster and fully apply this errata update: https://docs.redhat.com/en/documentation/red_hat_openshift_ai/
Workaround
No verified workaround is recorded. If business-safe, reduce exposure to the affected interface and allow only trusted sources until authoritative guidance is available.
04
Evidence and provenance
Published 31 Jul 2026 · Last source change 24 Sept 2026, 14:18 UTC · CWE-94 · Improper Control of Generation of Code ('Code Injection')
CVE recordCVE.org · 5.2
CVSS sourceCNA
EPSS source ?The date BlackTree first stored a score for this CVE from the daily FIRST EPSS feed.FIRST · tracked since 2026-08-14
European sourceENISA EUVD · EUVD-2026-51650
Product sourceVendor CSAF · Red Hat Product Security
Remediation sourceVendor CSAF · Red Hat Product Security
CWE sourceCNA
NVD statusNVD not scheduled
Core structured fields are present and their contributing authorities are shown above.
Affected versionsThe structured affected or fixed version information changed.
Before
sentence-transformers: ≤ 5.5.1 · Fixed: No fixed version is explicitly recorded in the structured CVE data.
After
sentence-transformers: ≤ 5.5.1 · Fixed: For Red Hat OpenShift AI 3.3.7 see the following documentation, which will be updated shortly for this release, for important instructions on how to upgrade your cluster and fully apply this errata update: https://docs.redhat.com/en/documentation/red_hat_openshift_ai/
Affected versionsThe structured affected or fixed version information changed.
Before
lightspeed-core/lightspeed-stack-rhel9 as a component of Lightspeed Core; lightspeed-core/rag-tool-cpu-rhel9 as a component of Lightspeed Core; lightspeed-core/rag-tool-cuda-12.9-rhel9 as a component of Lightspeed Core; openshift-lightspeed/lightspeed-service-api-rhel9 as a component of OpenShift Lightspeed; ansible-automation-platform-25/lightspeed-chatbot-rhel8 as a component of Red Hat Ansible Automation Platform 2; ansible-automation-platform-26/lightspeed-chatbot-rhel9 as a component of Red Hat Ansible Automation Platform 2; ansible-automation-platform-27/lightspeed-chatbot-rhel9 as a component of Red Hat Ansible Automation Platform 2; rhelai3/bootc-cuda-rhel9 as a component of Red Hat Enterprise Linux AI (RHEL AI) 3; rhelai3/bootc-gaudi-rhel9 as a component of Red Hat Enterprise Linux AI (RHEL AI) 3; rhelai3/bootc-rocm-rhel9 as a component of Red Hat Enterprise Linux AI (RHEL AI) 3; rhelai3/disk-image-cuda-rhel9 as a component of Red Hat Enterprise Linux AI (RHEL AI) 3; rhoai/odh-caikit-nlp-rhel9 as a component of Red Hat OpenShift AI (RHOAI); rhoai/odh-openvino-model-server-rhel9 as a component of Red Hat OpenShift AI (RHOAI); rhoai/odh-trustyai-nemo-guardrails-server-rhel9 as a component of Red Hat OpenShift AI (RHOAI)
After
lightspeed-core/lightspeed-stack-rhel9 as a component of Lightspeed Core; lightspeed-core/rag-tool-cpu-rhel9 as a component of Lightspeed Core; lightspeed-core/rag-tool-cuda-12.9-rhel9 as a component of Lightspeed Core; openshift-lightspeed/lightspeed-service-api-rhel9 as a component of OpenShift Lightspeed; ansible-automation-platform-25/lightspeed-chatbot-rhel8 as a component of Red Hat Ansible Automation Platform 2; ansible-automation-platform-26/lightspeed-chatbot-rhel9 as a component of Red Hat Ansible Automation Platform 2; ansible-automation-platform-27/lightspeed-chatbot-rhel9 as a component of Red Hat Ansible Automation Platform 2; rhelai3/bootc-cuda-rhel9 as a component of Red Hat Enterprise Linux AI (RHEL AI) 3; rhelai3/bootc-gaudi-rhel9 as a component of Red Hat Enterprise Linux AI (RHEL AI) 3; rhelai3/bootc-rocm-rhel9 as a component of Red Hat Enterprise Linux AI (RHEL AI) 3; rhelai3/disk-image-cuda-rhel9 as a component of Red Hat Enterprise Linux AI (RHEL AI) 3; rhoai/odh-caikit-nlp-rhel9 as a component of Red Hat OpenShift AI (RHOAI); rhoai/odh-openvino-model-server-rhel9 as a component of Red Hat OpenShift AI (RHOAI) · Fixed: registry.redhat.io/rhoai/odh-trustyai-nemo-guardrails-server-rhel9@sha256:c85742ae7371a47ef7c850d5f2491ee9d67af17869278adde87f573eb6e5aba9_arm64 as a component of Red Hat OpenShift AI 3.3; registry.redhat.io/rhoai/odh-trustyai-nemo-guardrails-server-rhel9@sha256:e960e3601f388e87901c41aeaa8bb3f0634cd1e9d594bffc8d2a6047334c5488_amd64 as a component of Red Hat OpenShift AI 3.3
Affected versionsThe structured affected or fixed version information changed.
Before
lightspeed-core/lightspeed-stack-rhel9 as a component of Lightspeed Core; lightspeed-core/rag-tool-cpu-rhel9 as a component of Lightspeed Core; lightspeed-core/rag-tool-cuda-12.9-rhel9 as a component of Lightspeed Core; openshift-lightspeed/lightspeed-service-api-rhel9 as a component of OpenShift Lightspeed; ansible-automation-platform-25/lightspeed-chatbot-rhel8 as a component of Red Hat Ansible Automation Platform 2; ansible-automation-platform-26/lightspeed-chatbot-rhel9 as a component of Red Hat Ansible Automation Platform 2; ansible-automation-platform-27/lightspeed-chatbot-rhel9 as a component of Red Hat Ansible Automation Platform 2; rhelai3/bootc-cuda-rhel9 as a component of Red Hat Enterprise Linux AI (RHEL AI) 3; rhelai3/bootc-gaudi-rhel9 as a component of Red Hat Enterprise Linux AI (RHEL AI) 3; rhelai3/bootc-rocm-rhel9 as a component of Red Hat Enterprise Linux AI (RHEL AI) 3; rhelai3/disk-image-cuda-rhel9 as a component of Red Hat Enterprise Linux AI (RHEL AI) 3; rhoai/odh-caikit-nlp-rhel9 as a component of Red Hat OpenShift AI (RHOAI); rhoai/odh-caikit-tgis-serving-rhel9 as a component of Red Hat OpenShift AI (RHOAI); rhoai/odh-openvino-model-server-rhel9 as a component of Red Hat OpenShift AI (RHOAI); rhoai/odh-trustyai-nemo-guardrails-server-rhel9 as a component of Red Hat OpenShift AI (RHOAI)
After
lightspeed-core/lightspeed-stack-rhel9 as a component of Lightspeed Core; lightspeed-core/rag-tool-cpu-rhel9 as a component of Lightspeed Core; lightspeed-core/rag-tool-cuda-12.9-rhel9 as a component of Lightspeed Core; openshift-lightspeed/lightspeed-service-api-rhel9 as a component of OpenShift Lightspeed; ansible-automation-platform-25/lightspeed-chatbot-rhel8 as a component of Red Hat Ansible Automation Platform 2; ansible-automation-platform-26/lightspeed-chatbot-rhel9 as a component of Red Hat Ansible Automation Platform 2; ansible-automation-platform-27/lightspeed-chatbot-rhel9 as a component of Red Hat Ansible Automation Platform 2; rhelai3/bootc-cuda-rhel9 as a component of Red Hat Enterprise Linux AI (RHEL AI) 3; rhelai3/bootc-gaudi-rhel9 as a component of Red Hat Enterprise Linux AI (RHEL AI) 3; rhelai3/bootc-rocm-rhel9 as a component of Red Hat Enterprise Linux AI (RHEL AI) 3; rhelai3/disk-image-cuda-rhel9 as a component of Red Hat Enterprise Linux AI (RHEL AI) 3; rhoai/odh-caikit-nlp-rhel9 as a component of Red Hat OpenShift AI (RHOAI); rhoai/odh-openvino-model-server-rhel9 as a component of Red Hat OpenShift AI (RHOAI); rhoai/odh-trustyai-nemo-guardrails-server-rhel9 as a component of Red Hat OpenShift AI (RHOAI)
Affected versionsThe structured affected or fixed version information changed.
Before
lightspeed-core/lightspeed-stack-rhel9 as a component of Lightspeed Core; lightspeed-core/rag-tool-cpu-rhel9 as a component of Lightspeed Core; lightspeed-core/rag-tool-cuda-12.9-rhel9 as a component of Lightspeed Core; openshift-lightspeed/lightspeed-service-api-rhel9 as a component of OpenShift Lightspeed; ansible-automation-platform-25/lightspeed-chatbot-rhel8 as a component of Red Hat Ansible Automation Platform 2; ansible-automation-platform-26/lightspeed-chatbot-rhel9 as a component of Red Hat Ansible Automation Platform 2; ansible-automation-platform-27/lightspeed-chatbot-rhel9 as a component of Red Hat Ansible Automation Platform 2; rhelai3/bootc-cuda-rhel9 as a component of Red Hat Enterprise Linux AI (RHEL AI) 3; rhelai3/bootc-gaudi-rhel9 as a component of Red Hat Enterprise Linux AI (RHEL AI) 3; rhelai3/bootc-rocm-rhel9 as a component of Red Hat Enterprise Linux AI (RHEL AI) 3; rhelai3/disk-image-cuda-rhel9 as a component of Red Hat Enterprise Linux AI (RHEL AI) 3; rhoai/odh-caikit-nlp-rhel9 as a component of Red Hat OpenShift AI (RHOAI); rhoai/odh-caikit-tgis-serving-rhel9 as a component of Red Hat OpenShift AI (RHOAI); rhoai/odh-llama-stack-core-rhel9 as a component of Red Hat OpenShift AI (RHOAI); rhoai/odh-openvino-model-server-rhel9 as a component of Red Hat OpenShift AI (RHOAI); rhoai/odh-trustyai-nemo-guardrails-server-rhel9 as a component of Red Hat OpenShift AI (RHOAI)
After
lightspeed-core/lightspeed-stack-rhel9 as a component of Lightspeed Core; lightspeed-core/rag-tool-cpu-rhel9 as a component of Lightspeed Core; lightspeed-core/rag-tool-cuda-12.9-rhel9 as a component of Lightspeed Core; openshift-lightspeed/lightspeed-service-api-rhel9 as a component of OpenShift Lightspeed; ansible-automation-platform-25/lightspeed-chatbot-rhel8 as a component of Red Hat Ansible Automation Platform 2; ansible-automation-platform-26/lightspeed-chatbot-rhel9 as a component of Red Hat Ansible Automation Platform 2; ansible-automation-platform-27/lightspeed-chatbot-rhel9 as a component of Red Hat Ansible Automation Platform 2; rhelai3/bootc-cuda-rhel9 as a component of Red Hat Enterprise Linux AI (RHEL AI) 3; rhelai3/bootc-gaudi-rhel9 as a component of Red Hat Enterprise Linux AI (RHEL AI) 3; rhelai3/bootc-rocm-rhel9 as a component of Red Hat Enterprise Linux AI (RHEL AI) 3; rhelai3/disk-image-cuda-rhel9 as a component of Red Hat Enterprise Linux AI (RHEL AI) 3; rhoai/odh-caikit-nlp-rhel9 as a component of Red Hat OpenShift AI (RHOAI); rhoai/odh-caikit-tgis-serving-rhel9 as a component of Red Hat OpenShift AI (RHOAI); rhoai/odh-openvino-model-server-rhel9 as a component of Red Hat OpenShift AI (RHOAI); rhoai/odh-trustyai-nemo-guardrails-server-rhel9 as a component of Red Hat OpenShift AI (RHOAI)
Technical terms and abbreviations used in this report
CVE
Common Vulnerabilities and Exposures: the public identifier for one disclosed vulnerability.
CVSS
Common Vulnerability Scoring System: a technical severity framework; it is not patching priority by itself.
EPSS
Exploit Prediction Scoring System: FIRST's estimate of the probability that exploitation activity will be observed in the next 30 days; it is a forecast, not confirmation.
CWE
Common Weakness Enumeration: the standard category describing the underlying software or hardware weakness.
CNA
CVE Numbering Authority: an organisation authorised to assign and publish CVE records.
CISA ADP
Cybersecurity and Infrastructure Security Agency Authorized Data Publisher: structured enrichment added to a CVE record.
NVD
National Vulnerability Database: NIST's enrichment service for CVE records.
CERT / CSIRT
A computer security incident response team that publishes warnings or coordinates incident response.
PoC
Proof of concept: public material that demonstrates or helps reproduce exploitation.
CSAF
Common Security Advisory Framework: a machine-readable format for security advisories.
LoTL
Living off the land: abuse of legitimate tools or system functions during an attack.