Overview
Simon Willison released LLM version 0.37.2 on 11th November 2026 to patch two security vulnerabilities (GHSA-v9h7-jj4g-f862 and GHSA-r639-rr7r-x72w) that could cause the tool to inadvertently send a user’s configured OpenAI API key to unintended third-party API providers. The LLM CLI tool is a popular open-source utility enabling command-line access to large language models, and its support for OpenAI-compatible third-party endpoints introduced the attack surface.
Technical Analysis
The vulnerability resides in LLM’s extra-openai-models.yaml mechanism — now managed via the llm openai endpoint add command introduced in version 0.37. This feature allows users to route requests through third-party providers that implement the OpenAI API specification.
Two distinct code paths could trigger unintended API key disclosure:
Unset api_key_name condition: If the key referenced by
api_key_namehad never been stored in the secrets store, LLM would fall back to the globally configured OpenAI API key and transmit it to the third-party endpoint instead of raising an error or using no key.Responses mode with chat completions override: When a model configured with
responses: truewas invoked using the-o chat_completions 1flag, the tool would similarly forward the OpenAI API key to the alternative endpoint.
In both cases, the legitimate OpenAI API key could be exfiltrated to an operator-controlled or malicious third-party endpoint, enabling credential theft and subsequent abuse of the victim’s OpenAI account.
Framework Mapping
- AML.T0057 – LLM Data Leakage: The unintended transmission of API credentials to third-party endpoints is a form of sensitive data leakage from an LLM tooling context.
- AML.T0083 – Credentials from AI Agent Configuration: The misconfiguration enables extraction of credentials stored in the agent/tool configuration layer.
- AML.T0084 – Discover AI Agent Configuration: A malicious endpoint operator could discover and harvest configuration secrets passed inadvertently.
- LLM06 – Sensitive Information Disclosure: API keys constitute highly sensitive credentials whose exposure can lead to financial harm and account takeover.
- LLM07 – Insecure Plugin Design: The endpoint extension mechanism lacked sufficient isolation between credential scopes for different providers.
Impact Assessment
Users who have configured the LLM CLI tool to use third-party OpenAI-compatible endpoints and who store their OpenAI API key in the tool’s secrets store are directly at risk. A malicious or compromised third-party API endpoint operator could harvest leaked keys and use them to make authenticated OpenAI API calls at the victim’s expense. The impact includes financial loss through API quota consumption, potential data exposure through model queries, and account compromise.
The vulnerability is particularly concerning because the credential leakage is silent — users would have no indication their key was forwarded to an unintended recipient.
Mitigation & Recommendations
- Upgrade immediately to LLM CLI version 0.37.2 or later.
- Rotate OpenAI API keys that were used in conjunction with any third-party endpoint configuration, as a precautionary measure.
- Audit your
extra-openai-models.yamland all endpoints added viallm openai endpoint addto verify they point to trusted providers. - Ensure
api_key_namevalues are correctly set and that corresponding secrets are stored before connecting to third-party endpoints. - Monitor OpenAI API usage logs for anomalous activity that could indicate credential misuse.
References
- LLM 0.37.2 Release — Simon Willison
- GHSA-v9h7-jj4g-f862
- GHSA-r639-rr7r-x72w