9.3 CRITICAL
- CVSS version (CVSS): 4.0
- Attack Vector (AV): Network (N)
- Attack Complexity (AC): Low (L)
- Attack Requirement (AT): None (N)
- Privileges Required (PR): None (N)
- User Interaction (UI): None (N)
- Vulnerable System Impact Confidentiality (VC): High (H)
- Vulnerable System Impact Integrity (VI): High (H)
- Vulnerable System Impact Availability (VA): High (H)
- Subsequent System Impact Confidentiality (SC): None (N)
- Subsequent System Impact Integrity (SI): None (N)
- Subsequent System Impact Availability (SA): None (N)
- Modified Attack Vector (MAV): Network (N)
- Modified Attack Complexity (MAC): Low (L)
- Modified Attack Requirement (MAT): None (N)
- Modified Privileges Required (MPR): None (N)
- Modified User Interaction (MUI): None (N)
- Modified Vulnerable System Impact Confidentiality (MVC): High (H)
- Modified Vulnerable System Impact Integrity (MVI): High (H)
- Modified Vulnerable System Impact Availability (MVA): High (H)
- Modified Subsequent System Impact Confidentiality (MSC): Negligible (N)
- Modified Subsequent System Impact Integrity (MSI): Negligible (N)
- Modified Subsequent System Impact Availability (MSA): Negligible (N)
- Safety (S): Not Defined (X)
- Automatable (AU): Not Defined (X)
- Recovery (R): Not Defined (X)
- Value Density (V): Not Defined (X)
- Vulnerability Response Effort (RE): Not Defined (X)
- Provider Urgency (U): Not Defined (X)
- Confidentiality Req. (CR): Not Defined (X)
- Integrity Req. (IR): Not Defined (X)
- Availability Req. (AR): Not Defined (X)
- Exploit Maturity (E): Not Defined (X)
by @LeSuisse Activity log
- Created suggestion
-
@LeSuisse
ignored
3 packages
- python313Packages.llm-sentence-transformers
- python314Packages.llm-sentence-transformers
- pkgsRocm.python3Packages.llm-sentence-transformers
- @LeSuisse accepted
- @LeSuisse ignored reference Product R…
- @LeSuisse published on GitHub
sentence-transformers Arbitrary Code Execution on Local Model Load Despite trust_remote_code=False
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
-
GitHub Issue issue-tracking
-
Pull Request vendor-advisory
-
Patch Commit patch
-
https://www.vulncheck.com/advisories/sentence-transformers-arbitrary-code-execu… third-party-advisory
Ignored references (1)
-
Product Repository product
Affected products
- =<5.5.1
Matching in nixpkgs
pkgs.python313Packages.sentence-transformers
Multilingual Sentence & Image Embeddings with BERT
pkgs.python314Packages.sentence-transformers
Multilingual Sentence & Image Embeddings with BERT
Ignored packages (3)
pkgs.python313Packages.llm-sentence-transformers
LLM plugin for embeddings using sentence-transformers
pkgs.python314Packages.llm-sentence-transformers
LLM plugin for embeddings using sentence-transformers