Skip to content
HighVulnerability

GHSA-fxg7-897c-57mp: Nuxt Ollama: Public Runtime Config Exposes Ollama API Key to Browser Clients

Published
Record updated
View JSON
Affected
  • nuxt-ollama >= 1.2.26, < 1.3.1
Fixed in
1.3.1
  • released June 20, 2026, 81 days before disclosure
Known exploitation
Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
EPSS
0.5%

Summary

nuxt-ollama@1.2.26 merges all module options, including api_key, into Nuxt's public runtime config (runtimeConfig.public.ollama) in src/module.ts. Nuxt serializes that namespace into the SSR HTML window.__NUXT__ payload, so any unauthenticated HTTP client that fetches a page can read the Ollama cloud API key in plaintext and use it against the Ollama API at the operator's expense.

Mitigation

Recommended remediation: Move api_key to the private runtime config and remove it from the browser composable. Split _options so api_key is written to runtimeConfig.ollama, while publicOptions without api_key are merged into runtimeConfig.public.ollama. The api_key should then only be consumed in the server-side utility (src/runtime/server/utils/useOllama.ts) via useRuntimeConfig().ollama.api_key.