Skip to content
Info disclosure Advisory Beginner

GHSL-2025-056: Ollama token leak in AnythingLLM

An unauthenticated endpoint exposed the Ollama authentication token in plain text because the masking logic failed to cover it. An attacker could use this token to fully access the Ollama instance, modify model behaviour, and potentially hijack conversations or access other users' documents.

Michael Stepankin Follow

Originally disclosed on GitHub Security Lab

If AnythingLLM is configured to use Ollama with an authentication token, this token could be exposed in plain text to unauthenticated users at the /api/setup-complete endpoint.

artsploit, on GitHub Security Lab

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 report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely a missing masking rule for the Ollama authentication token in the system settings response, so the token was returned unmasked.

Impact

The leaked token grants complete access to the Ollama instance, allowing an attacker to modify model templates or system prompts, hijack conversations, invoke tools, and potentially access other users' uploaded documents.

What the attacker needed

AnythingLLM configured to use Ollama with an auth token; Network access to the AnythingLLM instance

The fix

The vulnerability was fixed by correcting the masking logic so the Ollama token is no longer exposed.

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 report has not been written yet. The Original tab links to the source.

AnythingLLM is a tool that connects to AI models, and Ollama is one way to run those models locally. A secret token used to talk to Ollama was accidentally shown to anyone who visited a certain web address, even without logging in. With that token, someone could control the AI models and possibly see other people's chats and files.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

More by Michael Stepankin

View all

16 more disclosed reports, best first.

More from GitHub Security Lab

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.