🇰🇷 한글 설명
Ollama for Windows의 업데이트 메커니즘에서 HTTP 응답 헤더를 검증하지 않아 경로 순회 공격이 가능합니다. 공격자가 헤더 값을 조작하면 파일이 의도한 위치 외부에 작성되어 Windows Startup 디렉토리 등에 임의의 실행파일을 설치할 수 있습니다. 서명 검증 부재(CVE-2026-42248)와 함께 악용되면 사용자 인지 없이 자동 및 지속적인 코드 실행이 가능합니다.
💡 쉬운 설명
Ollama의 자동 업데이트 기능에 보안 결함이 있어서 공격자가 악의적인 프로그램을 몰래 설치할 수 있습니다. 컴퓨터가 시작될 때마다 자동으로 실행되기 때문에 사용자가 알아차리지 못하는 사이에 피해를 입을 수 있습니다.
🇺🇸 원문 (English)
Ollama for Windows contains a Remote Code Execution vulnerability in its update mechanism due to improper handling of attacker‑controlled HTTP response headers. When downloading updates, the application constructs local file paths using values derived from HTTP headers without validation. These values are passed directly to filepath.Join, allowing path traversal sequences (../) to be resolved and enabling files to be written outside the intended update staging directory.
An attacker who can influence update responses can exploit this flaw to write arbitrary executables to attacker‑chosen locations accessible to the current user, including the Windows Startup directory. This allows execution of arbitrary executables.
Critically, when chained with CVE‑2026‑42248 (Missing Signature Verification for Updates), an attacker can deliver malicious payloads that are written to sensitive locations and executed automatically. Because Ollama for Windows performs silent automatic updates and executes staged binaries without user interaction, this results in automatic and persistent code execution without user awareness.
Maintainers of this project were notified early about this vulnerability, but didn't respond with the details of vulnerability or vulnerable version range. Versions from 0.12.10 to 0.17.5 were tested and confirmed as vulnerable, other versions were not tested but might also be vulnerable.
📍 영향받는 시스템
Ollama for Windows 버전 0.12.10~0.17.5 (테스트 버전, 다른 버전도 취약할 수 있음)
⚔️ 공격 벡터
HTTP 업데이트 응답 헤더를 조작하여 경로 순회(../)로 Windows Startup 디렉토리 등에 악성 실행파일 작성
🛡️ 대응 방법
Ollama를 최신 버전으로 업데이트하거나 자동 업데이트 기능 비활성화 및 네트워크 트래픽 검사 실시
🔧 검증 코드
출력된 버전이 0.12.10 이상 0.17.5 이하이면 해당 취약점이 있을 가능성이 있습니다.
ollama --version 2>/dev/null | grep -oE '[0-9]+\.[0-9]+\.[0-9]+'