{
  "id": "CVE-2026-68770",
  "url": "https://poc.griffinguard.io/cve/CVE-2026-68770",
  "published_at": "2026-07-31T20:56:06.867Z",
  "title": "sentence-transformers Arbitrary Code Execution on Local Model Load Despite trust_remote_code=False",
  "vendor": "Hugging Face",
  "product": "sentence-transformers",
  "cvss": {
    "score": 9.8,
    "source": "cna",
    "vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": null,
  "poc_repo_count": 0,
  "exploit_count": 0,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "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 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.",
  "cwe": "CWE-94",
  "cvss_by_source": {
    "cna": 9.8
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "Hugging Face",
        "product": "sentence-transformers",
        "ranges": [
          "\u003c= 5.5.1"
        ],
        "fixed_in": null
      },
      {
        "vendor": "",
        "product": "sentence-transformers",
        "ranges": [
          "\u003c 5.6.0"
        ],
        "fixed_in": [
          "5.6.0"
        ],
        "ecosystem": "PyPI",
        "advisory": "GHSA-jhr6-gm9c-rqjv"
      }
    ],
    "upgrade": [
      "Upgrade sentence-transformers to 5.6.0 or later."
    ],
    "references": [
      {
        "kind": "Vendor advisory",
        "url": "https://github.com/huggingface/sentence-transformers/pull/3807"
      },
      {
        "kind": "Patch",
        "url": "https://github.com/huggingface/sentence-transformers/commit/ae1acc3fb2aa2004577b297eb4a915ce7a03316a"
      }
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
