How I Found My First LLM Vulnerability and Escalated it to Admin Access
A chatbot with a file-read tool could be tricked into reading sensitive files outside its intended scope, exposing cloud API keys, service account secrets and a Kubernetes configuration file. The leaked LLM gateway admin key gave the researcher administrative control over the gateway, allowing creation and deletion of LLM connections across tenants, and a patched SSRF endpoint was bypassed to make an out-of-band connection.
Published on medium.com
Ai Security
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.
Context
The target was a site participating in a Vulnerability Disclosure Program; its sole purpose is a set of AI chatbots. Several chatbots were deployed, each with a different selection of tools offered by the application. The interesting one for this write-up is the file read tool, which lets the model read files on the server hosting the chatbot.
Setup
No accounts, roles or special tooling beyond a browser session and Burp Suite (including Burp Collaborator) are described. The precondition was simply that a deployed chatbot had the file read tool enabled. The researcher created a session for such a chatbot and began chatting with it.
Finding it
When the session was created, the system prompt was already visible, before any attempt to extract it. The file read tool was the part worth attacking: if the model can read files, the question is which files it will agree to read.

The first attempts asked the bot to read application configuration files. The bot refused, citing security guard rails.

Rather than guessing, the researcher gave the full context to Claude and asked which files could be read initially without being blocked, assuming a misconfiguration in the file read tool. The suggestion was requirements.txt. Reading it worked, the first hit.

That success suggested a pattern: the earlier configuration file was rejected, but what if an acceptable file and a non-acceptable file were requested together? The prediction was that the model could be confused into reading both. It did, and the result was described as a goldmine: an Azure API Key, a Private key ID, a Google service account and its associated secret access key and key ID.

Reading continued over several more files. The real jackpot was a k8s Kubernetes configuration file, which contained a secret API key for the LITE LLM service, the gateway used to manage all the LLMs hosted on the application. The same file also yielded an AWS Bedrock token and multiple other sensitive items.

The LLM gateway stood out because a secret API key in a configuration file is usually an admin access key. Checking the gateway URL with that key gave proxy admin access over the LLM gateway service.

Exploitation
Step 1: read files through the chatbot
The file read tool was reachable through ordinary chat. The bypass was to request an acceptable file together with one previously refused, which the model then read as well. The report does not reproduce the exact chat messages used. The output included credentials for Azure, Google and AWS, and then the Kubernetes configuration file with the LiteLLM secret key.
Step 2: use the LiteLLM key for proxy admin access
With the secret key from the Kubernetes configuration, the researcher opened the LLM gateway URL and obtained proxy admin access. From there, the openapi.json endpoint gave the full endpoint mapping of the service.


Step 3: prove control over LLM connections
The endpoint mapping showed that LLM connections could be created and deleted across different tenants. To prove it without causing damage, the researcher created a new LLM connection and then deleted it, rather than deleting an existing one.



With admin access, any LLM connection in the application could be created or deleted, including every connection across multiple tenants.
Step 4: SSRF on /health/connection
Looking for more, the researcher identified /health/connection as a potential SSRF endpoint. A Burp Collaborator payload was rejected with api_base is not allowed, which the report identifies as the patch for CVE-2024-6587.

The patch can be bypassed. The researcher followed the technique described in a public write-up about exploiting SSRF in LiteLLM (linked in the report as https://www.google.com/amp/s/escape.tech/blog/how-escape-exploited-ssrf-in-litellm/amp/) and reproduced a similar bypass.

The result was an out-of-band connection to Burp Collaborator, confirming SSRF. The exact payload is not reproduced in the report.
Root cause
The root cause is described as classic excessive agency: the file read tool was given overly permissive access to the /app root directory for the LLM. Because the model could read anything under that directory, configuration files containing cloud credentials and the LiteLLM secret key were within reach. Mixing an accepted file with a refused one in the same request got both read. On the gateway side, the secret key found in the Kubernetes configuration carried admin rights, so a file read primitive became administrative control of the LLM gateway. The api_base restriction on /health/connection was a patch for CVE-2024-6587, and it was bypassable with a known technique.

Impact
An attacker who can talk to a chatbot with the file read tool enabled could read files under /app, including configuration files with Azure, Google and AWS credentials and the LiteLLM secret key. With that key, the attacker obtained proxy admin access to the LLM gateway, could enumerate its API through openapi.json, and could create or delete any LLM connection across tenants. The researcher demonstrated this by creating and deleting a connection of their own. The SSRF on /health/connection allowed out-of-band requests to an attacker-controlled host. The report does not state a bounty amount or severity rating.
Fix
The report states that as of August 2026 the issue is no longer replicable and was published only after it was fixed. It does not describe the specific changes made. The root cause was excessive agency: overly permissive file read access to the /app root directory.
Variants to test
- Ask a tool-enabled chatbot for a benign file and a sensitive file in the same message. A positive result is the sensitive file's contents appearing in the response.
- Enumerate common files under the application root, starting with
requirements.txt, then configuration and Kubernetes files. A positive result is any credential or secret in the output. - Take any secret found in a configuration file and try it against the service it belongs to, such as an LLM gateway URL. A positive result is authenticated access, especially admin access.
- Fetch
openapi.jsonon any discovered gateway. A positive result is a full endpoint map revealing administrative operations. - Test
/health/connectionwith an out-of-band payload. A positive result is a callback to your Collaborator, especially after theapi_base is not allowedmessage, which indicates a bypassable patch.
What happened, in plain words
A security researcher was looking at a website that runs AI chatbots. The site was part of a Vulnerability Disclosure Program, which is a scheme where a company invites outside people to look for security problems and report them, usually instead of taking legal action against them. The whole point of this particular site was the chatbots: several of them were deployed, and each one had a different set of tools switched on.
A tool, in this context, is something the chatbot is allowed to do beyond talking. One of the tools on this site was a file read tool, which lets the AI model open and read files stored on the server that runs the chatbot. That is the tool the researcher focused on, because if an AI can read files on a server, the interesting question is which files it will agree to read.
The researcher chatted with a chatbot that had this tool enabled, got it to read files it should not have been able to read, and found cloud credentials and a secret key inside them. That key turned out to unlock the administrative interface of the service that manages all the chatbots' AI models. From there the researcher could create and delete AI model connections across different customers. Finally, a separate endpoint on that service was tested for a server-side request forgery (SSRF) problem, and a known bypass worked.
The report does not state a bounty amount or a severity rating. It says that as of August 2026 the issue could no longer be reproduced and that it was published only after it had been fixed.
Background you need first
A few ideas come up again and again below, so here they are from zero.
Chatbot and AI model. A chatbot is the chat window you type into. Behind it sits an AI model, a program that produces text. The model itself cannot open files or browse the web; it can only produce text. Anything more than text has to be done by the application around it.
Tool. A tool is a function the application offers to the model. When the model wants to use it, the application runs the function and gives the result back to the model, which then writes an answer. A file read tool is a function that takes a file path and returns the contents of that file. Think of it like a librarian: you ask for a book by name, the librarian fetches it, and you read it. The librarian can only fetch what is on the shelves they have access to, and that is exactly the part that matters here.
System prompt. Before you type anything, the application sends the model a hidden instruction text that sets its behaviour, for example telling it what it is and what it must not do. It is like the briefing note a new employee gets on their first morning.
Guard rails. Guard rails are the rules, written into the system prompt or enforced by the application, that are meant to stop the model doing harmful things, such as reading sensitive files. They are instructions, not walls: a model can sometimes be talked around them.
API. An API (Application Programming Interface) is a way for one program to talk to another over the network. Instead of a page designed for a human, the server offers addresses that accept requests and return data. Think of a restaurant: the menu is the API, the kitchen is the server, and you never walk into the kitchen yourself.
Endpoint. An endpoint is one specific address in an API, for example a path like /health/connection. Each endpoint does one job.
Token, key, secret. A key or token is a long random string that acts like a password for a program. Whoever holds it is treated as the owner. A secret key in a configuration file is like leaving the office master key taped under the reception desk.
Configuration file. A configuration file is a plain text file that tells a program how to run: which services to connect to, which addresses to use, and often which credentials to log in with. Because of that last part, configuration files are a favourite target.
Kubernetes and k8s. Kubernetes, often shortened to k8s, is software for running many programs across many machines. Its configuration files describe those programs and often contain the credentials they need.
LLM gateway. When a company uses several AI models from different providers, it often puts one service in front of them all. That service is the gateway: every request goes through it, and it holds the keys to the providers. LiteLLM is the name of the gateway product in this report. If you control the gateway, you control every model behind it.
Tenant. A tenant is one customer or organisation sharing the same application. Tenant separation is what stops one customer seeing another's data.
SSRF. Server-side request forgery is a bug where you can make the server itself send a request to an address of your choosing. The server sits inside the company network, so it can reach things you cannot. It is like persuading a member of staff to go and fetch something from a locked room on your behalf.
Out-of-band and Burp Collaborator. Out-of-band means the proof does not come back in the normal response. Burp Collaborator is a service that gives you a unique address you control; if the target server contacts that address, you receive a notification. It is a way of proving the server really made the request, even when the response says nothing useful.
Burp Suite. Burp Suite is a tool that sits between your browser and the website so you can see and edit every request. It is the standard toolkit for this kind of testing.
Setting up
The report does not describe accounts, roles or tooling beyond the browser session and Burp Collaborator. The only precondition was that a deployed chatbot had the file read tool enabled. The researcher created a session for such a chatbot and started chatting with it.
Finding it
When the session was created, the system prompt was already visible, before any attempt to extract it. The system prompt was already visible when the session was created. The file read tool was the part worth attacking, because if the model can read files, the question becomes which files it will agree to read.

The screenshot shows the session being created for a chatbot that already had the file read tool selected.
The first attempts asked the bot to read application configuration files. The bot refused, citing security guard rails.

The screenshot shows the chat where the bot declines to read the configuration files because of those guard rails.
Rather than guessing file names, the researcher gave the full context to Claude, another AI assistant, and asked which files could be read at first without being blocked, assuming the file read tool was misconfigured. The suggestion was requirements.txt. Reading it worked, and that was the first hit.

The screenshot shows the chat where requirements.txt is read successfully.
Why does requirements.txt matter? It is an ordinary file in many Python projects that lists the libraries the project needs. It was the file Claude suggested trying first, and reading it worked. Getting any file read at all proves the tool works and that the model will follow a file request; the next step is to widen what it will read.
That success suggested a pattern. The earlier configuration file had been rejected, but what if an acceptable file and a non-acceptable file were requested together in the same message? The prediction was that the model could be confused into reading both. It was, and the result was described as a goldmine: an Azure API Key, a Private key ID, a Google service account and its associated secret access key and key ID.

The screenshot shows the credentials returned by the chatbot after the combined request.
This is the core trick of the whole report, and it is worth stating plainly. Requesting a harmless file next to a sensitive one confused the model into reading both. It is like a security guard who checks the first bag on the trolley and waves the whole trolley through.
Reading continued over several more files. The real jackpot was a k8s Kubernetes configuration file, which contained a secret API key for the LITE LLM service, the gateway used to manage all the LLMs hosted on the application. The same file also yielded an AWS Bedrock token and multiple other sensitive items.

The screenshot shows the Kubernetes configuration file contents, including the LiteLLM secret key.
The LLM gateway stood out because a secret API key in a configuration file is usually an admin access key. The report notes that in configuration files such keys are usually admin access keys. Checking the gateway URL with that key gave proxy admin access over the LLM gateway service.

The screenshot shows the gateway interface reached with the secret key, with admin access.
Exploitation
Step 1: read files through the chatbot
The file read tool was reachable through ordinary chat, with no special interface. The bypass was to combine a file the model accepted with one it had previously refused, in the same request, so that the guard rails did not apply to the second file. The report does not reproduce the exact chat messages used. The output included credentials for Azure, Google and AWS, and then the Kubernetes configuration file with the LiteLLM secret key.
Step 2: use the LiteLLM key for proxy admin access
With the secret key from the Kubernetes configuration, the researcher opened the LLM gateway URL and obtained proxy admin access. From there, the openapi.json endpoint gave the full endpoint mapping of the service.
openapi.json is a machine-readable description of an API: it lists every endpoint, what each one accepts and what it returns. Many frameworks publish it automatically. For someone who has just obtained admin access, it is a map of the building handed over at the front desk.


The two screenshots show the endpoint mapping obtained from openapi.json.
Step 3: prove control over LLM connections
The endpoint mapping showed that LLM connections could be created and deleted across different tenants. To prove it without causing damage, the researcher created a new LLM connection and then deleted it, rather than deleting an existing one.



The three screenshots show the connection being created and then deleted as proof of concept.
This is a good habit in any test: prove the capability with something you own, not with something the customer needs. Deleting a real connection could take a customer's chatbot offline, which turns a clean report into an incident.
With admin access, any LLM connection in the application could be created or deleted, including every connection across multiple tenants.
Step 4: SSRF on /health/connection
Looking for more, the researcher identified /health/connection as a potential SSRF endpoint. The report identifies /health/connection as a potential SSRF endpoint to test. Any feature that contacts an address you supply is a candidate for SSRF.
A Burp Collaborator payload was rejected with api_base is not allowed, which the report identifies as the patch for CVE-2024-6587. A CVE is a public identifier for a known vulnerability; this one is the SSRF issue in LiteLLM that the patch was written to close. The message means the gateway now checks the address and refuses ones it does not like.

The screenshot shows the rejection message when the Collaborator payload is submitted.
The patch can be bypassed. The researcher followed the technique described in a public write-up about exploiting SSRF in LiteLLM, linked in the report as https://www.google.com/amp/s/escape.tech/blog/how-escape-exploited-ssrf-in-litellm/amp/, and reproduced a similar bypass.

The screenshot shows the bypass being applied.
The result was an out-of-band connection to Burp Collaborator, confirming SSRF. The exact payload is not reproduced in the report. The public write-up explains the specific form used.
Root cause
The root cause is described as classic excessive agency: the file read tool was given overly permissive access to the /app root directory for the LLM. Excessive agency means giving an automated component more power than its job requires. The model did not need to read the whole application directory to answer questions, but it could.
Because the model could read anything under that directory, configuration files containing cloud credentials and the LiteLLM secret key were within reach. The guard rails that refused configuration files were not robust: mixing an accepted file with a refused one in the same request got both read. On the gateway side, the secret key found in the Kubernetes configuration carried admin rights, so a file read primitive became administrative control of the LLM gateway. The api_base restriction on /health/connection was a patch for CVE-2024-6587, and it was bypassable with a known technique.

The screenshot illustrates the overly permissive file read access on the /app root directory.
The failures combined: a tool with too much reach, guard rails that could be sidestepped, a powerful key stored where the tool could reach it, and a patch that could be worked around. Together they turn a chat message into control of a shared service: a tool with too much reach, guard rails that can be sidestepped, a powerful key stored where the tool can reach it, and a patch that can be worked around.
Impact
An attacker who can talk to a chatbot with the file read tool enabled could read files under /app, including configuration files with Azure, Google and AWS credentials and the LiteLLM secret key. With that key, the attacker obtained proxy admin access to the LLM gateway, could enumerate its API through openapi.json, and could create or delete any LLM connection across tenants. The researcher demonstrated this by creating and deleting a connection of their own. The SSRF on /health/connection allowed out-of-band requests to an attacker-controlled host.
Fix
The report states that as of August 2026 the issue is no longer replicable and was published only after it was fixed. The root cause was excessive agency: overly permissive file read access to the /app root directory.
An allowlist means naming the few files that are permitted, instead of trying to name the ones that are forbidden. Blocklists fail because there is always another way to write a name; allowlists fail closed.
Variants to test
If you want to look for the same pattern on a site you are authorised to test, these are the steps in order.
- Ask a tool-enabled chatbot for a benign file and a sensitive file in the same message. A positive result is the sensitive file's contents appearing in the response.
- Enumerate common files under the application root, starting with
requirements.txt, then configuration and Kubernetes files. A positive result is any credential or secret in the output. - Take any secret found in a configuration file and try it against the service it belongs to, such as an LLM gateway URL. A positive result is authenticated access, especially admin access.
- Fetch
openapi.jsonon any discovered gateway. A positive result is a full endpoint map revealing administrative operations. - Test
/health/connectionwith an out-of-band payload. A positive result is a callback to your Collaborator, especially after theapi_base is not allowedmessage, which indicates a bypassable patch.
Glossary
- API: a way for one program to talk to another over the network, with defined addresses and formats.
- API key: a long random string that identifies and authorises a program, working like a password.
- AWS Bedrock: Amazon's service for running AI models; a token for it grants access to that service.
- Azure: Microsoft's cloud platform; an Azure API key grants access to resources there.
- Blocklist: a list of things that are forbidden; anything not on the list is allowed.
- Allowlist: a list of things that are permitted; anything not on the list is refused.
- Burp Collaborator: a service that gives you an address you control, used to detect requests the target server makes out of band.
- Burp Suite: a tool that sits between your browser and a website so you can inspect and modify requests.
- Chatbot: a chat interface backed by an AI model.
- Configuration file: a text file that tells a program how to run, often including credentials.
- CVE: a public identifier for a known vulnerability.
- Endpoint: one specific address in an API that performs one job.
- Excessive agency: giving an automated component more power than its task requires.
- Guard rails: rules meant to stop a model doing harmful things.
- Kubernetes (k8s): software for running many programs across many machines, configured by files that often hold credentials.
- LiteLLM: an LLM gateway product that sits in front of several AI model providers.
- LLM: large language model, the AI model behind a chatbot.
- LLM gateway: a single service in front of several AI providers that routes requests and holds the provider keys.
- OpenAPI /
openapi.json: a machine-readable description of an API's endpoints. - Out-of-band: proof of a request that arrives through a different channel than the normal response.
- Proxy admin access: administrative control over a gateway service that forwards requests to other services.
- Secret key: a credential that grants access to a service.
- SSRF: server-side request forgery, a bug where you make the server send a request to an address of your choosing.
- System prompt: hidden instructions sent to the model before the user types anything.
- Tenant: one customer or organisation sharing the same application.
- Token: a string used in place of a password to prove identity to a service.
- Tool: a function the application offers to a model, such as reading a file.
- Vulnerability Disclosure Program: a scheme where a company invites outside people to report security problems.