CriticalVulnerability
GHSA-jhr6-gm9c-rqjv: sentence-transformers local model loading bypasses trust_remote_code and executes custom Python
- Identifiers
- CVE-2026-68770GHSA-jhr6-gm9c-rqjv
- Published
- Record updated
- Affected
- sentence-transformers < 5.6.0
- Fixed in
- 5.6.0
- released June 16, 2026, 45 days before disclosure
- Known exploitation
- Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
- EPSS
- 0.6%Estimated probability that this CVE is exploited in the next 30 days, from the FIRST Exploit Prediction Scoring System. Read on .
Summary
sentence-transformers contains a logic flaw in the import_module_class helper in sentence_transformers/util/misc.py. Its guard includes an 'or os.path.exists(model_name_or_path)' clause, so a local path satisfies the trust gate even when trust_remote_code=False. An attacker who controls a model directory on disk can place malicious Python files such as modeling_*.py, referenced via modules.json, which execute at import time when an application calls SentenceTransformer(path, trust_remote_code=False).
Mitigation
The source does not state a fix yet. Check the original advisory for updates.
Affected packages in the Exposure Registry
Matched by package name and ecosystem. Each entry shows whether the package delegates to a language model and how many tracked packages depend on it.
- sentence-transformersPyPILLM dependency since 2024-01-29, 43 tracked dependents
Topics
Related items
- HighCVE-2026-142491: eole eval injection in pydantic configuration validatorsSame vendor, NVD/CVE Database
- MediumCVE-2026-142248: MLflow through 3.18.0 contains a server-side request forgery vulnerability in the AI Gateway LiteLLM provider that…Same vendor, NVD/CVE Database
- HighCVE-2026-141343: DLOmix unsafe deserialization code execution via malicious PyTorch model filesSame vendor, NVD/CVE Database
- HighCVE-2026-139989: Languagemodels 1.0.0 contains a template injection vulnerability in Config.use_hf_model that allows remote attackers to…Same vendor, NVD/CVE Database
- MediumCVE-2026-134825: Gradio 6.27.0 before 6.32.0 contains an authentication bypass vulnerability in gradio/history.py that allows remote…Same vendor, NVD/CVE Database