Vulnerability in nuxt-ollama (CVE-2026-59158)
Summary
Vulnerability in nuxt-ollama (CVE-2026-59158). Risk of unauthorized operations or information disclosure. Exploitable via api_key. Mitigation: upgrade to 1.3.1 or later.
Original description
The description as published by the source.
Public Runtime Config Exposes Ollama API Key to Browser Clients
Summary
nuxt-ollama@1.2.26 unconditionally merges all module options — including api_key — into Nuxt's public runtime config (runtimeConfig.public.ollama). Nuxt serializes runtimeConfig.public into the SSR HTML response inside a `` payload block (window.__NUXT__), making the API key visible in plaintext to any unauthenticated HTTP client that fetches the page. An attacker with no credentials can steal the Ollama cloud API key with a single HTTP GET request, then use it to make arbitrary requests to the Ollama API at the operator's expense.
Details
The vulnerability is a design flaw in src/module.ts. During Nuxt module setup, the entire _options object — which contains api_key when configured for cloud Ollama as documented in README.md:71-80 — is merged into the public runtime config namespace:
// src/module.ts:35-36
const currentConfig = (runtimeConfig.public.ollama ?? {}) as OllamaOptions
runtimeConfig.public.ollama = defu(currentConfig, _options)
Nuxt's SSR pipeline serializes runtimeConfig.public and embeds it in every server-rendered HTML page for client-side hydration. This results in the api_key appearing verbatim in the window.__NUXT__ script block:
window.__NUXT__={};
window.__NUXT__.config={
public:{
ollama:{
protocol:"https",
host:"api.ollama.com",
port:"",
proxy:false,
api_key:"LEAKED_TEST_KEY_123"…
Source: GitHub Security Advisories (Global) NVD GitHub Advisory
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2026-59158 has been found in nuxt-ollama.
Attackers can target a specific entry point like api_key over the network to misuse the product.
Risk of unauthorized operations or information disclosure.
What to do: upgrade nuxt-ollama to 1.3.1 or later.
If unsure, ask your IT team or search "nuxt-ollama CVE-2026-59158" on the vendor's site.
CVE-2026-59158 (nuxt-ollama) — CWE-522
Attack surface: api_key / runtimeConfig.public.ollama / runtimeConfig.public / window.__NUXT__
Patched: 1.3.1 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
A vulnerability (CWE-522) exists in nuxt-ollama. Attackers reach the vulnerable code path via api_key.
Check the vendor advisory for the affected versions of nuxt-ollama. Attack surface: api_key / runtimeConfig.public.ollama / runtimeConfig.public / window.__NUXT__.
Severity: ?. Risk of unauthorized operations or information disclosure.
Update to 1.3.1.
Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'nuxt-ollama' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
grep -r 'nuxt-ollama' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
nuxt-ollamaを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply patch patch
Upgrade nuxt-ollama to 1.3.1ステージング環境で 1.3.1 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
References
- package github.com
- web github.com
- web github.com