CodingSoftware & developer tools
llm 0.37.2 fixes two bugs that sent users' OpenAI API keys to third-party endpoints
Simon Willison's llm command-line tool could send a user's OpenAI API key to other providers' OpenAI-compatible endpoints, contradicting its documentation. Two Moderate-rated advisories describe separate leak paths, one dating to version 0.6; both are fixed in llm 0.37.2.
From the Simon Willison article of November 11, 2026 and cited sources: There were two separate leak paths. [4] [5]
SOURCES[4] GHSA-v9h7-jj4g-f862 github.com[5] GHSA-r639-rr7r-x72w github.com
AI-assisted, not human-edited. Methodology Corrections Who owns this site
- Original source
- Simon Willison article, independent perspective
- Brief by
- AT Pulse research desk AI-assisted; publisher and contact on the desk page
- When
- November 11, 2026 article published
- Covered
- Nov 14 edition
- Evidence
- 8 sources across 5 sites
Reach: not measured yet
There were two separate leak paths. In the first, if the key named by api_key_name had never been stored, the tool quietly fell back to OPENAI_API_KEY and sent it to the custom api_base. This affects versions 0.6 through 0.37.1. In the second, the delegate used by -o chat_completions 1 did not inherit its parent model's key setting, so it sent the stored OpenAI key. This affects versions 0.32a2 through 0.37.1. [4] [5]
Both bugs broke a promise in the documentation that the OpenAI key is never sent when api_base is set. The flaws were found by comparing that promise against the code. That points to two lessons: wrappers created at runtime should inherit their parent's credential scope, and a missing key should raise an error rather than fall back to another one. [4] [5] [7]
Users who routed llm through proxies, gateways or self-hosted servers should upgrade to 0.37.2 and check api_base entries in extra-openai-models.yaml. If they used endpoints they don't control, they should rotate their OpenAI key. Users who can't upgrade can store a key for each custom model and avoid the chat_completions option on custom endpoints. [1] [3] [4] [5]
the advisories show keys were sent silently as Bearer tokens to custom api_base servers.
Read the full assessment
Implication: anyone routing llm through third-party gateways or proxies should upgrade, audit extra-openai-models.yaml, and consider rotating OpenAI keys, since exposure depended on endpoint operators.
Executive brief
Since version 0.6, Simon Willison's llm command-line tool could send a user's OpenAI API key to a third-party server. This happened when a model was pointed at another provider's OpenAI-compatible endpoint, even though the docs said it never would. Two GitHub advisories, both rated Moderate, describe two separate ways the key leaked. Both are fixed in llm 0.37.2, released 11 November 2026. The first leak path dates back to 0.6. Anyone who has routed llm through a non-OpenAI gateway should upgrade and think about rotating their OpenAI key. No CVE has been assigned to either advisory.
What changed and event timeline
LLM 0.37 adds an endpoint-management command
Introduces
llm openai endpoint addfor registering OpenAI-compatible servers, adds gpt-6.1-sol and gpt-6.1-terra, and changes the default model to gpt-6-luna.0.37.1 patches data bugs
Fixes YAML formatting in endpoint configuration, a system prompt being dropped when both
system=andmessages=were passed, and crashes when servers omit usage data.First advisory published
GHSA-v9h7-jj4g-f862: if the key named by
api_key_namehad never been stored, LLM fell back toOPENAI_API_KEYand sent it to the customapi_base. Affects 0.6–0.37.1.Second advisory and 0.37.2 release
GHSA-r639-rr7r-x72w: the
-o chat_completions 1delegate leaked the stored OpenAI key. Affects 0.32a2–0.37.1. Both leaks are fixed in 0.37.2.
Capabilities and access
- Patched version:
llm0.37.2. 0.37.1 and earlier are affected (releases). - Other changes in 0.37.2: piped attachments via Bash process substitution, no traceback on empty attachments, and YAML parsing fixes for indented lists and document markers (releases).
- Configuration: custom endpoints live in
extra-openai-models.yaml, which thellm openai endpoint add/list/remove/pathcommands now manage (LLM 0.37 post; explainx guide).
Read the full section
- Patched version:
llm0.37.2. 0.37.1 and earlier are affected (releases). - Other changes in 0.37.2: piped attachments via Bash process substitution, no traceback on empty attachments, and YAML parsing fixes for indented lists and document markers (releases).
- Configuration: custom endpoints live in
extra-openai-models.yaml, which thellm openai endpoint add/list/remove/pathcommands now manage (LLM 0.37 post; explainx guide).
Technical analysis for researchers and developers
- Leak path 1 (key fallback): the code that looks up keys treated a missing named key as "use the default."
- Leak path 2 (attribute not passed on):
Responses.execute()andAsyncResponses.execute()create a Chat Completions "delegate" model but did not copy the parent model'sneeds_keysetting. - Lesson for tool builders: when a wrapper object is created at runtime, it needs to inherit the parent's credential scoping.
Read the full section
- Leak path 1 (key fallback): the code that looks up keys treated a missing named key as "use the default." It fell through to
OPENAI_API_KEYand sent that value as a Bearer token toapi_base. The advisory says this affected every code path, including plain Chat models, and could be triggered by a typo or a skipped setup step (advisory). - Leak path 2 (attribute not passed on):
Responses.execute()andAsyncResponses.execute()create a Chat Completions "delegate" model but did not copy the parent model'sneeds_keysetting. The delegate therefore kept its default,needs_key = "openai", and sent the OpenAI key. This only happened when noapi_key_namewas set (advisory). - Lesson for tool builders: when a wrapper object is created at runtime, it needs to inherit the parent's credential scoping. Missing credentials should cause an error, not a silent fallback.
Claims and evidence
- "Your OpenAI key is never sent when
api_baseis set." That is the documented contract, and it explicitly covers-o chat_completions 1. - Affected version ranges (0.6+ and 0.32a2+): these come from the maintainer's own advisories. No independent reproduction was found in the reviewed sources.
- Who found it: Willison credits Daniel de Araujo (post). One advisory lists the reporter as "BluePlexus" (advisory).
Read the full section
- "Your OpenAI key is never sent when
api_baseis set." That is the documented contract, and it explicitly covers-o chat_completions 1. Both advisories show the code did not honour it before 0.37.2. - Affected version ranges (0.6+ and 0.32a2+): these come from the maintainer's own advisories. No independent reproduction was found in the reviewed sources.
- Who found it: Willison credits Daniel de Araujo (post). One advisory lists the reporter as "BluePlexus" (advisory). The other says the flaw was found through AI-assisted documentation review and confirmed by local testing (advisory).
- Corroboration: no independent news coverage of these advisories turned up in the reviewed sources.
Context and prior work
llmis Willison's command-line tool and Python library for working with many LLM providers.- Before 0.37, users configured these endpoints by editing YAML by hand.
- Willison said 0.37 had 12 contributors, mostly through AI-assisted pull requests. This disclosure also came out of AI-assisted review.
Read the full section
llmis Willison's command-line tool and Python library for working with many LLM providers. OpenAI-compatible endpoints are its standard way of reaching other vendors and local servers (LLM 0.37 post).- Before 0.37, users configured these endpoints by editing YAML by hand. The new 0.37 command makes adding gateways easier, so more users now run setups that could hit these leak paths (letsdatascience).
- Willison said 0.37 had 12 contributors, mostly through AI-assisted pull requests. He described them as manageable, comparing them to "bug reports with attached examples" (LLM 0.37 post). This disclosure also came out of AI-assisted review.
Limitations, safety and contested findings
Read the full section
- Both advisories are rated Moderate. Neither has a CVE (v9h7, r639).
- Workarounds for anyone who can't upgrade yet:
- Store a key for every custom model with
llm keys set <name>. - Avoid
-o chat_completions 1on models that use a customapi_base. - The leak gave no warning to the user. Whether any key was actually captured depends on how trustworthy each endpoint operator was, and none of the sources describe any known exploitation.
Business and practitioner implications
- Upgrade to 0.37.2. Then check
extra-openai-models.yamlfor anyapi_baseentry that pointed at a third party, proxy or self-hosted gateway. - If you ran affected configurations against endpoints you don't control, rotate your OpenAI key and review its usage logs.
- Security teams should treat tools that send to many providers as places where credentials can cross over.
Read the full section
- Upgrade to 0.37.2. Then check
extra-openai-models.yamlfor anyapi_baseentry that pointed at a third party, proxy or self-hosted gateway. - If you ran affected configurations against endpoints you don't control, rotate your OpenAI key and review its usage logs.
- Security teams should treat tools that send to many providers as places where credentials can cross over. Scope keys per provider and use project-limited OpenAI keys to limit damage if one leaks.
- Maintainers should write tests for the promises their docs make: these bugs were found by comparing the docs against the code.
The source trail.
Sources (8)
llm 0.37.2
Article text retrieved; extracted text may omit tables or interactive elements.
simonwillison.net