CVE-2026-68770
Description
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.
Statement
A remote code execution vulnerability was found in the sentence-transformers library. The import_module_class() function bypasses the trust_remote_code=False security check when loading models from a local file path. If a model's modules.json references a class outside the sentence_transformers.* namespace, arbitrary code execution can occur when the model is loaded.
Red Hat rates this flaw as Important rather than the upstream Critical and AV:L/AC:H because exploitation requires the attacker to first gain local access to place a malicious model on the target system's filesystem.
Mitigation
Red Hat has investigated whether a possible mitigation exists for this issue, and has not been able to identify a practical example. Please update the affected package as soon as possible.
Note: sentence-transformers 5.6.0 does NOT fix this vulnerability (it only adds a deprecation warning). The fix is planned for version 6.0.
Common Vulnerability Scoring System (CVSS) Score Details
Info alert:Important note
CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).
The following CVSS metrics and score provided are preliminary and subject to review.
CVSS v3 Score Breakdown
| Red Hat | NVD | cve.org | |
|---|---|---|---|
| Base Score | 7.4 | N/A | 9.8 |
| Attack Vector | Local | N/A | Network |
| Attack Complexity | High | N/A | Low |
| Privileges Required | None | N/A | None |
| User Interaction | None | N/A | None |
| Scope | Unchanged | N/A | Unchanged |
| Confidentiality | High | N/A | High |
| Integrity Impact | High | N/A | High |
| Availability Impact | High | N/A | High |
Vector
Red Hat: CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
cve.org: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Understanding the Weakness (CWE)
Integrity
Technical Impact: Modify Application Data
An attacker could gain access to and modify sensitive data or system information.
Frequently Asked Questions
Not sure what something means? Check out our Security Glossary.
Want to get errata notifications? Sign up here.