{"schema":"threatline.record/2","record":{"id":"CVE-2026-68770","aliases":["GHSA-jhr6-gm9c-rqjv","PYSEC-2026-4164"],"summary":"sentence-transformers local model loading bypasses trust_remote_code and executes custom Python","details":"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.","categories":["Libraries & packages"],"product":"sentence-transformers","vendor":"Hugging Face","ecosystem":"pip","affected_ranges":[{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-jhr6-gm9c-rqjv","source_modified_at":"2026-09-30T23:24:25Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"pip","name":"sentence-transformers"},"range":"< 5.6.0"},{"source":"CVE List","source_url":"https://www.cve.org/CVERecord?id=CVE-2026-68770","source_modified_at":"2026-10-08T15:24:17.537Z","fetched_at":"2026-10-23T18:45:31.882637Z","product":"sentence-transformers","vendor":"Hugging Face","versions":[{"version":"0","status":"affected","versionType":"semver","lessThanOrEqual":"5.5.1"}],"defaultStatus":"affected"},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-jhr6-gm9c-rqjv","source_modified_at":"2026-10-01T17:55:41.036478465Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"PyPI","name":"sentence-transformers","purl":"pkg:pypi/sentence-transformers"},"ranges":[{"events":[{"introduced":"0"},{"fixed":"5.6.0"}],"type":"ECOSYSTEM"}],"versions":["0.1.0","0.2.0","0.2.1","0.2.2","0.2.3","0.2.4","0.2.4.1","0.2.5","0.2.5.1","0.2.6","0.2.6.1","0.2.6.2","0.3.0","0.3.1","0.3.2","0.3.3","0.3.4","0.3.5","0.3.5.1","0.3.6","0.3.7","0.3.7.1","0.3.7.2","0.3.8","0.3.9","0.4.0","0.4.1","0.4.1.1","0.4.1.2","1.0.0","1.0.1","1.0.2","1.0.3","1.0.4","1.1.0","1.1.1","1.2.0","1.2.1","2.0.0","2.1.0","2.2.0","2.2.1","2.2.2","2.3.0","2.3.1","2.4.0","2.5.0","2.5.1","2.6.0","2.6.1"]}],"fixed_versions":[{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-jhr6-gm9c-rqjv","source_modified_at":"2026-09-30T23:24:25Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"pip","name":"sentence-transformers"},"version":"5.6.0"},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-jhr6-gm9c-rqjv","source_modified_at":"2026-10-01T17:55:41.036478465Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"PyPI","name":"sentence-transformers","purl":"pkg:pypi/sentence-transformers"},"version":"5.6.0"}],"cvss":9.3,"severity":"Critical","kev":{"listed":false},"epss":{"probability":0.00909,"percentile":0.59605,"score_date":"2026-10-23"},"published_at":"2026-07-31T20:56:06.867Z","modified_at":"2026-10-08T15:24:17.537Z","provenance":[{"source":"GitHub Advisory Database","url":"https://github.com/advisories/GHSA-jhr6-gm9c-rqjv","fetched_at":"2026-10-23T18:42:43.628194Z","source_modified_at":"2026-09-30T23:24:25Z"},{"source":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-68770","fetched_at":"2026-10-23T18:45:31.882637Z","source_modified_at":"2026-10-08T15:24:17.537Z"},{"source":"OSV","url":"https://osv.dev/vulnerability/GHSA-jhr6-gm9c-rqjv","fetched_at":"2026-10-23T18:42:43.628194Z","source_modified_at":"2026-10-01T17:55:41.036478465Z"},{"source":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-68770","fetched_at":"2026-10-23T18:42:43.628194Z","source_modified_at":"2026-10-23"}],"sources":["GitHub Advisory Database","CVE List","OSV","EPSS"],"references":[{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-68770","source":"GitHub Advisory Database"},{"source":"CVE List","url":"https://github.com/huggingface/sentence-transformers/issues/3801","tags":["exploit"]},{"source":"CVE List","url":"https://github.com/huggingface/sentence-transformers/pull/3807","tags":["vendor-advisory"]},{"source":"CVE List","url":"https://github.com/huggingface/sentence-transformers/commit/ae1acc3fb2aa2004577b297eb4a915ce7a03316a","tags":["patch"]},{"source":"CVE List","url":"https://github.com/huggingface/sentence-transformers","tags":["product"]},{"source":"CVE List","url":"https://www.vulncheck.com/advisories/sentence-transformers-arbitrary-code-execution-on-local-model-load-despite-trust-remote-code-false","tags":["third-party-advisory"]},{"url":"https://github.com/huggingface/sentence-transformers/pull/3935","source":"GitHub Advisory Database"},{"url":"https://github.com/huggingface/sentence-transformers/commit/626eb602b088878a8173bcab69225f68411b99e1","source":"GitHub Advisory Database"},{"url":"https://github.com/huggingface/sentence-transformers/releases/tag/v5.6.0","source":"GitHub Advisory Database"},{"url":"https://github.com/huggingface/sentence-transformers/releases/tag/v6.0.0","source":"GitHub Advisory Database"},{"url":"https://github.com/advisories/GHSA-jhr6-gm9c-rqjv","source":"GitHub Advisory Database"}],"locations":[],"motoko_assessment":{"status":"requires_architecture_review","automatic_remediation":false},"cve_state":"PUBLISHED","ssvc":{"exploitation":"poc","automatable":"yes","technical_impact":"total","assessed_at":"2026-08-03T18:15:42.984440Z"},"classification":{"method":"product-first software-layer rules","rules_version":"2.1","matched_on":"ecosystem","confidence":"heuristic","reviewed":false},"change_timestamp":"2026-10-08T15:24:17.537Z","content_hash":"0ba1747155f49730ff3f7dcc66515daa561a5c02f39e65acf8d5e08a365f9639"}}
