Arbitrary Code Execution Affecting sentence-transformers package, versions [,3.1.0)
Do your applications use this vulnerable package?
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applications- Snyk ID SNYK-PYTHON-SENTENCETRANSFORMERS-8161344
- published 3 Oct 2024
- disclosed 1 Oct 2024
- credit Unknown
How to fix?
Upgrade sentence-transformers
to version 3.1.0 or higher.
Overview
sentence-transformers is a State-of-the-Art Text Embeddings
Affected versions of this package are vulnerable to Arbitrary Code Execution when loading PyTorch model files. The torch.load()
function, used without the weights_only=True
parameter, could deserialize malicious Python objects from manipulated model files.