CVE-2026-27616: Vikunja Vulnerable to Stored Cross-Site Scripting (XSS) via Unsanitized SVG Attachment Upload Leading to Token Exposure

Published Feb 25, 2026
·
Updated

Details The application allows users to upload SVG files as task attachments. SVG is an XML-based format that supports JavaScript execution through elements such as <script> tags or event handlers like onload.

The application does not sanitize SVG content before storing it. When the uploaded SVG file is accessed via its direct URL, it is rendered inline in the browser under the application's origin. As a result, embedded JavaScript executes in the context of the authenticated user.

Because the authentication token is stored in localStorage, it is accessible via JavaScript and can be retrieved by a malicious payload.

Key security issues identified:

No server-side sanitization of SVG content. SVG attachments are rendered inline instead of being forced as a download. Embedded JavaScript within SVG files is allowed to execute. Authentication tokens stored in localStorage are accessible to client-side scripts.

PoC

Tested Environment

[ ] Application version: 1.1.0 [ ] Deployment type: Self-hosted

Steps to Reproduce

1. Log in to an account. 2. Go to Projects and Create a new task or open an existing task. 3. Upload the following SVG file as an attachment:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <svg onload="alert(localStorage.getItem('token'))" xmlns="http://www.w3.org/2000/svg"> </svg>

4. After uploading ,save the Task and open the project , copy the direct URL of the attachment. 5. Open the attachment URL in a new browser tab. 6. The embedded JavaScript executes immediately and displays the authentication token stored in localStorage.

This confirms that arbitrary JavaScript embedded in an uploaded SVG file executes within the application's context.

Impact

This vulnerability is classified as Stored Cross-Site Scripting (XSS).

Potential impact includes:

Execution of arbitrary JavaScript in a victim’s browser. Exposure of authentication tokens. Potential account takeover. Ability to perform authenticated actions on behalf of the victim. Possible privilege escalation if higher-privileged users open the malicious attachment. Any authenticated user who accesses a malicious SVG attachment may be affected.

Recommendations

This vulnerability can be mitigated by implementing proper server-side sanitization of SVG uploads and preventing inline execution of uploaded files.

Specifically:

- Sanitize all uploaded SVG files to remove <script> elements, event handlers (e.g., onload), and other executable content. - Serve attachments with Content-Disposition: attachment to prevent inline rendering. - Implement a strict Content Security Policy (CSP) to block script execution within uploaded files. - Store authentication tokens in HttpOnly, Secure cookies instead of localStorage to prevent JavaScript access. - Applying these controls will prevent stored XSS via SVG uploads and significantly reduce the risk of token exposure and account takeover.

Attachment Stored XSS Proof of concept.pdf

A fix is available at https://github.com/go-vikunja/vikunja/releases/tag/v2.0.0.

Other sources

Vikunja is an open-source self-hosted task management platform. Prior to version 2.0.0, the application allows users to upload SVG files as task attachments. SVG is an XML-based format that supports JavaScript execution through elements such as <script> tags or event handlers like onload. The application does not sanitize SVG content before storing it. When the uploaded SVG file is accessed via its direct URL, it is rendered inline in the browser under the application's origin. As a result, embedded JavaScript executes in the context of the authenticated user. Because the authentication token is stored in localStorage, it is accessible via JavaScript and can be retrieved by a malicious payload. Version 2.0.0 patches this issue.

NVD

Affected Software

3 affected components
Vikunja Vikunja<2.0.0
go/code.vikunja.io/api<=0.24.6
Vikunja Vikunja<2.0.0

Event History

Feb 25, 2026
CVE Published
via MITRE·09:37 PM
Data Sourced
via MITRE·09:37 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·10:16 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·10:16 PM
Affected Software
Advisory Published
via GitHub·10:40 PM
Data Sourced
via GitHub·10:40 PM
DescriptionSeverityWeaknessAffected Software
Dec 18, 58147
Event
via FIRST·12:29 AM

Frequently Asked Questions

1

What is the severity of CVE-2026-27616?

CVE-2026-27616 is classified as a high-severity vulnerability due to the potential for stored cross-site scripting (XSS) attacks.

2

How do I fix CVE-2026-27616?

To fix CVE-2026-27616, upgrade Vikunja to version 2.0.0 or later where this vulnerability is resolved.

3

What issues does CVE-2026-27616 cause?

CVE-2026-27616 allows attackers to execute arbitrary JavaScript code through uploaded SVG files, posing a risk to user data and session security.

4

Which versions of Vikunja are affected by CVE-2026-27616?

CVE-2026-27616 affects all versions of Vikunja prior to version 2.0.0.

5

Is there a workaround for CVE-2026-27616 until I can update?

A temporary workaround for CVE-2026-27616 is to disable the upload of SVG files as task attachments until the application can be updated.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203