
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-59158 is a credentials exposure vulnerability in the nuxt-ollama npm package that causes Ollama cloud API keys to be leaked in plaintext to any unauthenticated browser client. The flaw affects nuxt-ollama versions >= 1.2.26 and < 1.3.1, and was first published by the maintainer on June 20, 2026, with the advisory added to the GitHub Advisory Database on September 9, 2026. It carries a CVSS v3.1 base score of 7.5 (High) (GitHub Advisory).
The root cause is a design flaw in src/module.ts (CWE-522: Insufficiently Protected Credentials). During Nuxt module setup, the entire _options object — including the api_key field — is unconditionally merged into Nuxt's public runtime config namespace (runtimeConfig.public.ollama) via runtimeConfig.public.ollama = defu(currentConfig, _options). Nuxt's SSR pipeline then serializes runtimeConfig.public and embeds it verbatim in every server-rendered HTML page inside a <script> block (window.__NUXT__), making the API key readable by any HTTP client. The browser-side composable (src/runtime/composables/useOllama.ts) subsequently reads this value and forwards it as an Authorization: Bearer header in client-side API calls, completing the exposure chain (GitHub Advisory, Security Advisory).
Any unauthenticated party — including passive network observers, web crawlers, or anonymous visitors — who performs a single HTTP GET request to an affected application can extract the Ollama cloud API key from the window.__NUXT__ payload in the HTML response. Consequences of key theft include unauthorized use of the Ollama cloud API at the operator's expense, rate-limit exhaustion or billing quota abuse, potential data exfiltration if the key grants read access to stored models or conversations, and reputational damage or service disruption. End-users of the affected application are not directly at risk, but operators who follow the official documentation to configure ollama.api_key are fully exposed without any awareness (GitHub Advisory).
A public proof-of-concept (PoC) is included in the GitHub Security Advisory, consisting of a Dockerfile and Python script that reproduce the leak against a containerized vulnerable application with a single unauthenticated HTTP GET request. No special tools, credentials, or user interaction are required. There is no evidence of in-the-wild exploitation or threat actor attribution at this time, and the CVE is not listed in the CISA KEV catalog. EPSS score data is not yet available for this CVE (GitHub Advisory).
nuxt-ollama versions >= 1.2.26 and < 1.3.1 configured with a cloud api_key. This can be done via web search, Shodan, or by inspecting npm dependency manifests in public repositories.curl -s https://target-app.example.com/window.__NUXT__ script block in the returned HTML to locate the api_key field:curl -s https://target-app.example.com/ | grep -o 'api_key":"[^"]*"'curl -H 'Authorization: Bearer <STOLEN_KEY>' https://api.ollama.com/api/...(GitHub Advisory, Security Advisory)api.ollama.com from IP addresses not associated with legitimate users.window.__NUXT__ payloads containing api_key in plaintext within cached or logged HTTP responses.Upgrade nuxt-ollama to version 1.3.1 or later, which moves api_key to the private runtime config (runtimeConfig.ollama) and removes it from the public namespace. As an interim workaround, operators should avoid setting ollama.api_key in the module options and instead proxy Ollama API calls through a server-side route that injects the key server-side only. Immediately rotate any Ollama cloud API keys that may have been exposed on affected deployments (GitHub Advisory, Security Advisory).
The vulnerability was reported by EQSTLab and published by the maintainer (thoda-dev) on June 20, 2026, with the advisory formally added to the GitHub Advisory Database on September 9, 2026. No significant broader media coverage or notable public researcher commentary beyond the advisory itself has been identified at this time (GitHub Advisory).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."