Dumping a Database with an AI Chatbot
The login page accepted any username without a password, granting an authentication cookie. The AI chatbot could run arbitrary SQL queries, allowing an attacker to dump the database and read local files.
Published on synack.com
We’re seeing AI chatbots a lot these days. They’re everywhere fromNotion toAWS Docs.
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 the application had no real authentication and the chatbot was given unrestricted SQL execution privileges.
Impact
An attacker could dump the entire database and read local files on the server.
What the attacker needed
Access to the login page; no password required
How it was found
- Enter any username on the login page to get an authentication cookie.
- Ask the chatbot about its capabilities; it reveals it can run SQL queries.
- Ask the chatbot to execute arbitrary SQL queries and return results.
- Use queries to enumerate the database user, list tables, and dump rows from the person table.
- Use a query to list and read local files.
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.
A login page let anyone in without checking a password. The chatbot behind it could run database commands, so a visitor could ask it to show private data or files on the server.
What is AI / LLM?
Prompt injection, data exfiltration and tool abuse in features built on language models, and the ordinary bugs around them.