SYS::ONLINE
Wasteland.
Briefs1640
Issues21
SinceFeb 2026
LIVE
⚡ Active KEV CVE-2026-68770 2026-07-31

CVE-2026-68770: sentence-transformers Executes Untrusted Code Despite trust_remote_code=False

"A logic flaw in Hugging Face's sentence-transformers library lets a local model directory execute arbitrary Python at load time even when the application explicitly passes `trust_remote_code=False`."

A logic flaw in Hugging Face's sentence-transformers library lets a local model directory execute arbitrary Python at load time even when the application explicitly passes trust_remote_code=False.

What Is It

CVE-2026-68770 is a security control bypass leading to arbitrary code execution (CWE-94) in the sentence-transformers library. The flaw lives in the import_module_class helper in sentence_transformers/util/misc.py. The guard that is supposed to enforce the trust boundary includes an or os.path.exists(model_name_or_path) clause; meaning the trust gate is satisfied whenever the supplied path simply exists on the local filesystem, regardless of the trust_remote_code=False argument.

An attacker who can control or influence the contents of a model directory on disk can drop malicious Python files, for example modeling_*.py referenced via modules.json, which are then imported and executed when an application calls SentenceTransformer(path, trust_remote_code=False). Code runs inside the loading process.

Why It Matters

The vulnerability carries a CVSS 3.1 base score of 9.8 (CRITICAL): vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H, with a secondary CVSS 4.0 score of 9.3 (CRITICAL). Per the CVSS 3.1 vector as recorded in the CVE entry, the metrics are network attack vector, low attack complexity, no privileges required and no user interaction, with high confidentiality, integrity, and availability impact.

The core problem is that trust_remote_code=False is the documented safety contract developers rely on when loading third-party or untrusted models. This bug silently voids that contract for any model already on disk, turning a defensive setting into a false sense of security.

What's Vulnerable

Patch Status

CVE-2026-68770 is not listed in CISA's Known Exploited Vulnerabilities catalog as of 2026-07-31, so there is no federal confirmation of active exploitation and no KEV-mandated remediation deadline. Upstream remediation is tracked in commit ae1acc3, issue #3801, and pull request #3807 in the sentence-transformers repository. The CVE record was published 2026-07-31 and remains in Received status pending NVD analysis.

Sources