Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐍
🐍 PyPI
Not in CISA KEV
CRITICAL severity

sentence-transformers local model loading bypasses trust_remote_code and executes custom PythonGHSA-jhr6-gm9c-rqjv

CRITICALFix: huggingface/sentence-transformers#3807

GHSA-jhr6-gm9c-rqjv is a critical-severity (CVSS 9.8) Code Injection vulnerability in sentence-transformers. A fix is available for sentence-transformers — see the affected versions and patch details below.

Also known asCVE-2026-68770PYSEC-2026-4164
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Oct 23, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

Proof-of-concept exploit code exists

  • CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
  • CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
  • A successful exploit gives an attacker total control of the affected component, not partial access.

Exploitation and automatability from CISA’s SSVC triage for GHSA-jhr6-gm9c-rqjv.

EPSS Exploitation Probability

via FIRST.org ↗
0.9%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs60th percentile — riskier than 60% of all scored CVEsHighest risk
0.02%0.48%0.95%1.41%0.5%0.5%0.9%0.9%Aug 26Oct 26Oct 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

GHSA-jhr6-gm9c-rqjv by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.

Where this sits among everything scored

Of 394,803 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.

Real-World Exposure

1 pkg affected
🐍sentence-transformers

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.

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.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🐍PyPIsentence-transformersall versions5.6.0pip install --upgrade 'sentence-transformers==5.6.0'

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for sentence-transformers, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update sentence-transformers to 5.6.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-jhr6-gm9c-rqjv is resolved across your whole dependency graph.

  3. Workarounds

    Stop passing untrusted input into the interpreter or shell: call the affected binary with an argument array rather than a composed command string, reject anything outside a strict allowlist of expected values, and run the component under an account that cannot reach beyond the work it legitimately does.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatImportant

A remote code execution vulnerability was found in the sentence-transformers library. The import_module_class() function bypasses the trust_remote_code=False security check when loading models from a local file path. If a model's modules.json references a class outside the sentence_transformers.* namespace, arbitrary…

Workaround published by Red Hat
Red Hat has investigated whether a possible mitigation exists for this issue, and has not been able to identify a practical example. Please update the affected package as soon as possible. Note: sentence-transformers 5.6.0 does NOT fix this vulnerability (it only adds a deprecation warning). The fix is planned for version 6.0.
Source: Red Hat security advisory for GHSA-jhr6-gm9c-rqjv (CC BY 4.0)
ProductFixed inAdvisory
Red Hat OpenShift AI 2.25rhoai/odh-caikit-nlp-rhel9:1791448212RHSA-2026:87410
Red Hat OpenShift AI 3.3rhoai/odh-trustyai-nemo-guardrails-server-rhel9:1789570674RHSA-2026:73987
Red Hat OpenShift AI 3.4rhoai/odh-trustyai-nemo-guardrails-server-rhel9:1791556128RHSA-2026:84734

Frequently Asked Questions

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 refer
O3 Security · Impact-Aware SCA

Is GHSA-jhr6-gm9c-rqjv in your dependencies?

Find it across PyPI, including transitive dependencies.

sentence-transformers local model loading bypasses…