{"id":82815,"date":"2026-08-01T00:47:32","date_gmt":"2026-07-31T21:17:32","guid":{"rendered":"https:\/\/afaghhosting.net\/blog\/cve-2026-68770-sentence-transformers-arbitrary-code-execution-on-local-model-load-despite-trust_remote_codefalse\/"},"modified":"2026-08-01T00:47:32","modified_gmt":"2026-07-31T21:17:32","slug":"cve-2026-68770-sentence-transformers-arbitrary-code-execution-on-local-model-load-despite-trust_remote_codefalse","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/cve-2026-68770-sentence-transformers-arbitrary-code-execution-on-local-model-load-despite-trust_remote_codefalse\/","title":{"rendered":"CVE-2026-68770 &#8211; sentence-transformers Arbitrary Code Execution on Local Model Load Despite trust_remote_code=False"},"content":{"rendered":"<p>CVE ID :CVE-2026-68770<\/p>\n<p>  Published : July 31, 2026, 9:17 p.m. | 31\u00a0minutes ago<\/p>\n<p>  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 &#8216;or os.path.exists(model_name_or_path)&#8217; 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.<\/p>\n<p>  Severity: 9.8 | CRITICAL<\/p>\n<p>  Visit the link for more details, such as CVSS details, affected products, timeline, and more&#8230;\u00a0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CVE ID :CVE-2026-68770 Published : July 31, 2026, 9:17 p.m. | 31\u00a0minutes ago 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 &#8216;or os.path.exists(model_name_or_path)&#8217; clause that satisfies the trust gate whenever &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[],"class_list":["post-82815","post","type-post","status-publish","format-standard","hentry","category-vulnerability"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/82815","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/comments?post=82815"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/82815\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=82815"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=82815"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=82815"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}