🇰🇷 한글 설명
Nuxt Ollama 모듈이 1.3.1 이전 버전에서 클라우드 api_key를 public runtimeConfig에 포함시켜, 서버 렌더링된 HTML의 window.__NUXT__ 페이로드를 통해 인증되지 않은 클라이언트에게 평문으로 노출됩니다. 또한 브라우저 측 Ollama 요청에서 이 키가 Bearer 인증 헤더로 사용되어 노출 범위가 넓어집니다.
💡 쉬운 설명
이전 버전의 Nuxt Ollama 모듈을 쓰면 클라우드 API 키가 웹페이지 소스에 그대로 들어가서 누구나 볼 수 있습니다. 노출된 키로 다른 사람이 요금을 발생시키거나 저장된 모델과 대화 내용에 접근할 수 있습니다.
🇺🇸 원문 (English)
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.
📍 영향받는 시스템
nuxt-ollama 1.3.1 미만 버전을 사용하는 Nuxt 애플리케이션 (클라우드 api_key 설정 시)
⚔️ 공격 벡터
공격자가 페이지 HTML의 window.__NUXT__ 페이로드를 조회해 평문 api_key를 획득한 뒤 무단 클라우드 API 요청에 사용
🛡️ 대응 방법
nuxt-ollama를 1.3.1 이상으로 업그레이드하고, 노출된 API 키를 즉시 폐기 후 재발급
🔧 검증 코드
출력된 버전이 1.3.1 미만이면 취약하며, 1.3.1 이상이면 패치된 버전입니다 (출력이 없으면 해당 패키지가 설치되지 않은 것입니다).
npm ls nuxt-ollama 2>/dev/null | grep nuxt-ollama
📊 CVSS Vector String
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
💻 영향받는 소프트웨어
IBM WebSphere Application Server