AI/Nov 14 edition/Reporting & analysis
CodingSafetyInfrastructure

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

KEY FACTS
What happened
There were two separate leak paths. [4] [5]
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
Evidence
8 sources across 5 sites

Reach: not measured yet

THE CORE IDEAS4 TAKEAWAYS
01

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]

02

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]

03

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]

04

The endpoint-management command added in llm 0.37 makes it easier to register OpenAI-compatible gateways. That raises the number of setups that could hit these leak paths on unpatched versions. [2] [8]

WHY IT MATTERS

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

  1. LLM 0.37 adds an endpoint-management command

    Introduces llm openai endpoint add for registering OpenAI-compatible servers, adds gpt-6.1-sol and gpt-6.1-terra, and changes the default model to gpt-6-luna.

  2. 0.37.1 patches data bugs

    Fixes YAML formatting in endpoint configuration, a system prompt being dropped when both system= and messages= were passed, and crashes when servers omit usage data.

  3. First advisory published

    GHSA-v9h7-jj4g-f862: if the key named by api_key_name had never been stored, LLM fell back to OPENAI_API_KEY and sent it to the custom api_base. Affects 0.6–0.37.1.

  4. Second advisory and 0.37.2 release

    GHSA-r639-rr7r-x72w: the -o chat_completions 1 delegate leaked the stored OpenAI key. Affects 0.32a2–0.37.1. Both leaks are fixed in 0.37.2.

Capabilities and access

  • Patched version: llm 0.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 the llm openai endpoint add/list/remove/path commands now manage (LLM 0.37 post; explainx guide).
Read the full section
  • Patched version: llm 0.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 the llm openai endpoint add/list/remove/path commands 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() and AsyncResponses.execute() create a Chat Completions "delegate" model but did not copy the parent model's needs_key setting.
  • 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_KEY and sent that value as a Bearer token to api_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() and AsyncResponses.execute() create a Chat Completions "delegate" model but did not copy the parent model's needs_key setting. The delegate therefore kept its default, needs_key = "openai", and sent the OpenAI key. This only happened when no api_key_name was 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_base is 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_base is 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

  • llm is 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
  • llm is 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

  • 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>.
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 1 on models that use a custom api_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.yaml for any api_base entry 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.yaml for any api_base entry 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.
FOLLOW THE EVIDENCE

The source trail.

Sources (8)
A LITTLE LESS NOISE. A LOT MORE CONTEXT.

Stay curious.
Follow the evidence.

Independent perspectives, the original sources, and room for the questions that don't have easy answers.

How we build the brief
Connect with us

Find us where you already read.