🇰🇷 한글 설명
Ollama 0.17.1 이전 버전의 GGUF 모델 로더에 힙 오버플로우 취약점이 존재합니다. /api/create 엔드포인트가 공격자의 조작된 GGUF 파일을 처리할 때 할당된 힙 버퍼를 벗어나 메모리를 읽게 되며, 이를 통해 환경변수, API 키, 시스템 프롬프트 등 민감한 정보가 유출될 수 있습니다.
💡 쉬운 설명
Ollama의 AI 모델 파일 처리 과정에서 악성 파일을 업로드하면 서버 메모리의 민감한 정보(API 키, 비밀번호 등)가 노출됩니다. 누구나 인증 없이 이 파일을 업로드할 수 있어 위험합니다.
🇺🇸 원문 (English)
Ollama before 0.17.1 contains a heap out-of-bounds read vulnerability in the GGUF model loader. The /api/create endpoint accepts an attacker-supplied GGUF file in which the declared tensor offset and size exceed the file's actual length; during quantization in fs/ggml/gguf.go and server/quantization.go (WriteTo()), the server reads past the allocated heap buffer. The leaked memory contents may include environment variables, API keys, system prompts, and concurrent users' conversation data, and can be exfiltrated by uploading the resulting model artifact through the /api/push endpoint to an attacker-controlled registry. The /api/create and /api/push endpoints have no authentication in the upstream distribution. Default deployments bind to 127.0.0.1, but the documented OLLAMA_HOST=0.0.0.0 configuration is widely used in practice (large public-internet exposure observed).
📍 영향받는 시스템
Ollama < 0.17.1 (특히 OLLAMA_HOST=0.0.0.0으로 인터넷 노출된 배포)
⚔️ 공격 벡터
조작된 GGUF 파일을 /api/create에 업로드하여 힙 메모리 읽기 유발, /api/push로 유출
🛡️ 대응 방법
Ollama를 0.17.1 이상으로 업그레이드, /api/create와 /api/push에 인증 추가, OLLAMA_HOST를 127.0.0.1로 설정
🔧 검증 코드
출력된 버전이 0.17.1 미만이면 VULNERABLE입니다 (예: 0.16.0 이하 = 취약, 0.17.1 이상 = 패치됨)
ollama --version | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' || echo 'Ollama not installed'
🇰🇷 KISA(한국인터넷진흥원) 보안 권고
이 CVE에 대한 한국 공식 권고 (1건)
Ollama 제품 보안 업데이트 권고
P3
📅 2026-05-12 · sec_notice
Ollama에서 Out-of-bounds Read 취약점(CVE-2026-7482)이 발견되었으며 0.17.1 미만 버전이 영향을 받습니다. 사용자는 0.17.1 이상으로 업데이트하거나 즉시 업데이트가 어려운 경우 외부 접근을 제한하고 API key를 교체할 것을 권장합니다.