Skip to main content
VulnerabilityPublished Updated

CVE-2026-68770: Hugging Face sentence-transformers · Code Injection

Affects Hugging Face sentence-transformersSource CVE Database V5

0
Compare

Not known to be exploited · CVSS 9.3 Critical.

Data as of 30 Oct 2026, 06:59 UTC

CVSS 4.0 base score
9.3Critical
How severe the flaw is on the 0–10 CVSS scale.
EPSS
0.9% chance of exploitation in 30 days – higher than 59% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
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

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 31 Jul 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 29 Oct 2026.

What to do

Affected software

ProductAffectedFixed in
Hugging Facesentence-transformersAffected
  • <=5.5.1
Fixed in–
PyPIsentence-transformerspkg:pypi/sentence-transformersOther threatsAffected
  • *
Fixed in–

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

Until an official fix is available, avoid loading models from untrusted or user-controlled directories. Do not rely solely on the trust_remote_code=False argument to prevent code execution from local model paths.

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.

References

Community reviews

Loading reviews…