CVE-2026-68770

Source
https://cve.org/CVERecord?id=CVE-2026-68770
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-68770.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-68770
Published
2026-07-31T20:56:06.867Z
Modified
2026-08-02T03:47:52.037538410Z
Severity
  • 9.3 (Critical) CVSS_V4 - 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 CVSS Calculator
Summary
sentence-transformers Arbitrary Code Execution on Local Model Load Despite trust_remote_code=False
Details

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.

Database specific
{
    "cwe_ids": [
        "CWE-94"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/68xxx/CVE-2026-68770.json",
    "cna_assigner": "VulnCheck"
}
References

Affected packages

Git / github.com/huggingface/sentence-transformers

Affected ranges

Type
GIT
Repo
https://github.com/huggingface/sentence-transformers
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed
Database specific
{
    "source": [
        "AFFECTED_FIELD",
        "REFERENCES"
    ],
    "extracted_events": [
        {
            "introduced": "0"
        },
        {
            "last_affected": "5.5.1"
        }
    ]
}

Affected versions

v0.*
v0.1.0
v0.2.0
v0.2.2
v0.2.3
v0.2.4
v0.2.5
v0.2.6
v0.3.0
v0.3.1
v0.3.2
v0.3.3
v0.3.4
v0.3.5
v0.3.6
v0.3.7
v0.3.8
v0.3.9
v0.4.0
v0.4.1
v1.*
v1.0.0
v1.0.2
v1.0.3
v1.0.4
v1.1.0
v2.*
v2.0.0
v2.1.0
v2.2.0
v2.2.1
v2.2.2

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-68770.json"