{"id":"CVE-2026-59158","kind":"vulnerability","aliases":["CVE-2026-59158"],"related":[],"title":"Nuxt Ollama module leaks cloud API key into public page payload","description":"Nuxt Ollama integrates the official Ollama JavaScript library into Nuxt applications. Prior to 1.3.1, `src/module.ts` unconditionally merges all module options, including a configured cloud `api_key`, into `runtimeConfig.public.ollama`. Nuxt serializes this public configuration into the server-rendered HTML `window.__NUXT__` payload, exposing the API key in plaintext to any unauthenticated client that fetches a page. `src/runtime/composables/useOllama.ts` also reads the public key and sends it as an `Authorization` `Bearer` credential in browser-side Ollama requests. Following the documented cloud configuration is sufficient; the visible application template need not make an Ollama request for the secret to leak. A stolen key permits unauthorized cloud API requests at the operator's expense, quota or rate-limit exhaustion, and access to stored models or conversations if the key grants those permissions. This issue is fixed in version 1.3.1.","summary":"The nuxt-ollama module copies its configured cloud api_key into the public runtime config, which Nuxt serializes into the server-rendered HTML window.__NUXT__ payload. Any visitor who loads a page can read the key in plaintext and use it for unauthorized Ollama cloud requests, spending quota or reading stored models and conversations the key can access.","severity":"high","cvss":7.5,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["javascript","nuxt","nuxt-ollama","ollama","package","self-hosted"],"not_affected_if":["local-ollama-no-cloud-key","version-1.3.1-or-later"],"how_to_check":"- Check the installed version: `npm ls nuxt-ollama` (or the matching lockfile entry).\n- Search the project config for a cloud key: `grep -rn \"api_key\" nuxt.config.*`.\n- Load a page and search the HTML source for the key or `window.__NUXT__` containing an `ollama` block with `api_key`.","fix":"- Upgrade the nuxt-ollama package to `1.3.1` or later.\n- Rotate the Ollama cloud API key after upgrading, since it may already have been exposed in served pages.\n- Move the key to a server-only runtime config value so it is never placed in the public config.","status":"open","published_at":"2026-10-27T23:17:06+00:00","first_seen_at":"2026-10-27T23:29:44+00:00","triaged_at":"2026-10-27T23:31:19+00:00","updated_at":"2026-10-27T23:31:19+00:00","category":"package","confidence":0.85,"triage":{"at":"2026-10-27T23:31:19Z","model":"claude-haiku-5-5","output":{"fix":"- Upgrade the nuxt-ollama package to `1.3.1` or later.\n- Rotate the Ollama cloud API key after upgrading, since it may already have been exposed in served pages.\n- Move the key to a server-only runtime config value so it is never placed in the public config.","reach":"internet","title":"Nuxt Ollama module leaks cloud API key into public page payload","impact":"high","summary":"The nuxt-ollama module copies its configured cloud api_key into the public runtime config, which Nuxt serializes into the server-rendered HTML window.__NUXT__ payload. Any visitor who loads a page can read the key in plaintext and use it for unauthorized Ollama cloud requests, spending quota or reading stored models and conversations the key can access.","category":"package","nicknames":[],"who_cares":["nuxt","nuxt-ollama","ollama","javascript","self-hosted"],"confidence":0.85,"needs_auth":"no","worst_case":"Attackers read the cloud API key from page HTML and spend quota or access stored data.","analyst_note":"","how_to_check":"- Check the installed version: `npm ls nuxt-ollama` (or the matching lockfile entry).\n- Search the project config for a cloud key: `grep -rn \"api_key\" nuxt.config.*`.\n- Load a page and search the HTML source for the key or `window.__NUXT__` containing an `ollama` block with `api_key`.","needs_analyst":false,"not_affected_if":["local-ollama-no-cloud-key","version-1.3.1-or-later"],"who_is_affected":"Nuxt applications that use the nuxt-ollama module with a cloud api_key configured are exposed, because the key is merged into the public runtime config and shipped to every client in the page payload. Teams running a local Ollama server without a cloud key, or on nuxt-ollama 1.3.1 or later, are not affected by this flaw.","user_interaction":"no","needs_special_setup":"yes","severity_if_unknown":"high"},"cost_usd":0.000975,"input_tokens":3538,"output_tokens":1242,"severity_before":"high"},"analyst_status":null,"analyst_note":null,"search":"'-2026':13A,16A '-59158':14A,17A '1.3.1':100C,222C 'access':86B,204C 'also':143C 'api':6A,37B,111C,130C,190C 'applic':97C,171C 'author':153C 'bearer':154C 'browser':158C 'browser-sid':157C 'client':137C 'cloud':5A,36B,73B,110C,165C,189C 'config':43B 'configur':35B,109C,119C,166C 'convers':82B,209C 'copi':33B 'credenti':155C 'cve':12A,15A 'document':164C 'exhaust':202C 'expens':196C 'expos':128C 'fetch':139C 'fix':219C 'follow':162C 'grant':213C 'host':27B 'html':52B,125C 'includ':107C 'integr':89C 'issu':217C 'javascript':18B,93C 'key':7A,38B,64B,84B,112C,131C,147C,186C,212C 'leak':4A,183C 'librari':94C 'limit':201C 'load':58B 'make':175C 'merg':103C 'model':80B,207C 'modul':3A,32B,105C 'need':173C 'nuxt':1A,19B,21B,30B,45B,87C,96C,115C 'nuxt-ollama':20B,29B 'offici':91C 'ollama':2A,22B,23B,31B,72B,88C,92C,160C,177C 'oper':194C 'option':106C 'packag':24B 'page':10A,60B,141C 'payload':11A,54B,127C 'permiss':215C 'permit':187C 'plaintext':66B,133C 'prior':98C 'public':9A,41B,118C,146C 'quota':76B,197C 'rate':200C 'rate-limit':199C 'read':62B,78B,144C 'render':51B,124C 'request':74B,161C,178C,191C 'runtim':42B 'runtimeconfig.public.ollama':114C 'secret':181C 'self':26B 'self-host':25B 'send':149C 'serial':46B,116C 'server':50B,123C 'server-rend':49B,122C 'side':159C 'spend':75B 'src/module.ts':101C 'src/runtime/composables/useollama.ts':142C 'stolen':185C 'store':79B,206C 'suffici':168C 'templat':172C 'unauthent':136C 'unauthor':71B,188C 'uncondit':102C 'use':68B 'version':221C 'visibl':170C 'visitor':56B 'window.__nuxt__':53B,126C","nicknames":[],"mitigations":[],"who_affected":"Nuxt applications that use the nuxt-ollama module with a cloud api_key configured are exposed, because the key is merged into the public runtime config and shipped to every client in the page payload. Teams running a local Ollama server without a cloud key, or on nuxt-ollama 1.3.1 or later, are not affected by this flaw.","tier":"B","verified":{},"analyst_revisit_at":null,"first_public_at":"2026-10-27T23:17:06+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","cvss_by":"security-advisories@github.com","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-59158","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-59158","severity":null,"published_at":"2026-10-27T23:17:06+00:00","modified_at":"2026-10-27T23:17:06+00:00","first_seen_at":"2026-10-27T23:29:44+00:00","fetched_at":"2026-10-27T23:29:44+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}