← All advisories
CVE-2026-59158highSecret exposure2026-10-27

CVE-2026-59158: nuxt-ollama puts your Ollama cloud API key in every server-rendered page, upgrade to 1.3.1

The nuxt-ollama module copied all its options, including a configured Ollama cloud api_key, into Nuxt's public runtime config before 1.3.1. Nuxt embeds that config in the window.__NUXT__ payload of every server-rendered page, so anyone who loads a page can read the key and spend your Ollama quota.

01.

What it is

src/module.ts merges every module option into runtimeConfig.public.ollama, including api_key when you follow the documented cloud setup.

Nuxt serializes runtimeConfig.public into the HTML it sends to browsers, so the key appears in plain text in the window.__NUXT__ script block. The page doesn't even need to make an Ollama request.

The browser-side useOllama composable also sends the key as an Authorization Bearer header.

A stolen key allows Ollama API requests at your expense, can exhaust your quota or rate limits, and may expose stored models or conversations if the key allows it.

02.

How to check

  1. Check whether your Nuxt app uses nuxt-ollama before 1.3.1 with an api_key set.
  2. Open your site's page source and search for api_key or your key inside window.__NUXT__.
03.

How to fix

  1. Upgrade nuxt-ollama to 1.3.1 or later.
  2. Rotate the Ollama API key, because any key that was served in your pages should be treated as leaked.
npm install nuxt-ollama@^1.3.1
# check a live page for the leak
curl -s https://your-site.example/ | grep -o 'api_key:"[^"]*"'
04.

Sources

More advisories for this tool
The weekly email

One email a week. Only what changed.

Every new security hole in AI coding tools, MCP servers, app builders and the stacks they generate (Next.js, Supabase, Node, PHP), each with how to check your app and the fix. No roundups of things you already read.

Free, one email a week. Read the latest issue first if you like. One-click unsubscribe in every email. We never sell or share addresses.