LLM 0.37.2 Patches API Key Leak to Third-Party Endpoints
Simon Willison's llm CLI tool released version 0.37.2, patching two security flaws that could leak the configured OpenAI API key to third-party OpenAI-compatible endpoints. The issues stem from the extra-openai-models.yaml mechanism, triggered when a named api_key_name was never stored or when a responses model was forced to use chat_completions.
Related Entities
Full Report
Fixes a security issue reported by Daniel de Araujo in GHSA-v9h7-jj4g-f862 and GHSA-r639-rr7r-x72w.
LLM has a mechanism called extra-openai-models.yaml - now managed by the new-in-0.37 llm openai endpoint add command - for using LLM with OpenAI-compatible API endpoints from other providers.
Daniel reported two ways this could accidentally send your configured OpenAI API key to one of those providers: if the key named by api_key_name had never been stored, or if a responses: true model was run with -o chat_completions 1.