Efficiency To Exploits Vulnerabilities In Ollama And Vanna Ai Automation
Ollama's API server lacked input validation on its model-pull endpoint, allowing a crafted model file to overwrite arbitrary files and achieve remote code execution. Vanna AI's chart-generation feature built Plotly code from LLM output, so a prompt injection could make the library run arbitrary commands.
Published on systemweakness.com
Remember how we learned to use our own AI tools on our computers? Well, there can be bumps in the road!
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely missing input validation on the model name in Ollama's pull endpoint, and unsafe evaluation of LLM-generated Plotly code in Vanna AI.
Impact
An attacker could overwrite files and run code on exposed Ollama servers, and could execute arbitrary commands through Vanna AI, leading to data breaches and system compromise; Ollama's risk is low on default Linux setups that only accept local connections, but high in Docker deployments listening on all interfaces.
What the attacker needed
Network access to the Ollama API; Docker deployment for remote exploitation; ability to send prompts to Vanna AI
The fix
Ollama was fixed in version 0.1.34, and both tools should be protected with authentication such as a reverse proxy and should not rely on pre-prompting alone.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
These are two separate bugs in AI tools. In Ollama, a server that downloads AI models could be tricked into saving a file in the wrong place, overwriting important system files and letting an attacker run their own code. In Vanna AI, a library that turns plain-English questions into database queries also builds chart code from the AI's answer, so a cleverly worded question could make it run commands on the server.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.