{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2026-68770","id":"CVE-2026-68770","title":"sentence-transformers Arbitrary Code Execution on Local Model Load Despite trust_remote_code=False","description":"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 files","descriptionLong":"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.","published":"2026-07-31T20:56:06.867Z","updated":"2026-11-09T02:47:29.503708464Z","reserved":"2026-07-31T16:10:55.448Z","status":"Deferred","rejected":false,"assigner":"VulnCheck","metric":{"version":"4.0","score":9.3,"vector":"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","rating":"critical","source":"VulnCheck"},"metrics":[{"version":"4.0","score":9.3,"vector":"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","rating":"critical","source":"VulnCheck"},{"version":"4.0","score":9.3,"vector":"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","rating":"critical","source":"vulncheck.com"},{"version":"4.0","score":null,"vector":"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","rating":"unrated","source":"OSV"},{"version":"4.0","score":null,"vector":"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","rating":"critical","source":"GitHub"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"VulnCheck"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"vulncheck.com"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"GitHub"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"OSV"}],"rating":"critical","products":["Hugging Face sentence-transformers"],"affectedProducts":[{"vendor":"Hugging Face","product":"sentence-transformers","defaultStatus":"affected","versions":[{"version":"0","status":"affected","versionType":"semver","lessThanOrEqual":"5.5.1"}],"platforms":[]}],"packages":[{"ecosystem":"PyPI","name":"sentence-transformers","purl":"pkg:pypi/sentence-transformers","ranges":["<5.6.0"],"fixed":["5.6.0"],"advisory":"GHSA-jhr6-gm9c-rqjv"}],"cwes":["CWE-94"],"aliases":["GHSA-jhr6-gm9c-rqjv","PYSEC-2026-4164"],"references":[{"url":"https://github.com/huggingface/sentence-transformers/issues/3801","tags":["issue-tracking","exploit","report","web"]},{"url":"https://github.com/huggingface/sentence-transformers/pull/3807","tags":["vendor-advisory","patch","fix","web"]},{"url":"https://github.com/huggingface/sentence-transformers","tags":["product","package"]},{"url":"https://github.com/huggingface/sentence-transformers/commit/ae1acc3fb2aa2004577b297eb4a915ce7a03316a","tags":["patch","fix","web"]},{"url":"https://www.vulncheck.com/advisories/sentence-transformers-arbitrary-code-execution-on-local-model-load-despite-trust-remote-code-false","tags":["third-party-advisory","advisory","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/68xxx/CVE-2026-68770.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-68770","tags":["advisory"]},{"url":"https://github.com/huggingface/sentence-transformers/pull/3935","tags":["web"]},{"url":"https://github.com/huggingface/sentence-transformers/commit/626eb602b088878a8173bcab69225f68411b99e1","tags":["web"]},{"url":"https://github.com/huggingface/sentence-transformers/releases/tag/v5.6.0","tags":["web"]},{"url":"https://github.com/huggingface/sentence-transformers/releases/tag/v6.0.0","tags":["web"]},{"url":"https://pypi.org/project/sentence-transformers","tags":["package"]},{"url":"https://github.com/advisories/GHSA-jhr6-gm9c-rqjv","tags":["advisory"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":true,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"total"},"epss":0.00909,"epssPercentile":0.60644,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-68770","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-68770","ok":true,"note":"Deferred"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2026-68770","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-jhr6-gm9c-rqjv","ok":true,"note":"GHSA-jhr6-gm9c-rqjv"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-68770","ok":true,"note":"scored 2026-11-18"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}