{"id":"CVE-2026-27616","aliases":["CVE-2026-27616","GHSA-7jp5-298q-jg98","GO-2026-4553"],"related":[],"kind":"vulnerability","state":"published","title":"Vikunja Vulnerable to Stored Cross-Site Scripting (XSS) via Unsanitized SVG Attachment Upload Leading to Token Exposure","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"**Details**\nThe 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.\n\nThe 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.\n\nBecause the authentication token is stored in localStorage, it is accessible via JavaScript and can be retrieved by a malicious payload.\n\nKey security issues identified:\n\n _No server-side sanitization of SVG content.\nSVG attachments are rendered inline instead of being forced as a download.\nEmbedded JavaScript within SVG files is allowed to execute.\n Authentication tokens stored in localStorage are accessible to client-side scripts._\n\n**PoC**\n\n_**Tested Environment**_\n\n[ ] Application version: 1.1.0\n[ ] Deployment type: Self-hosted\n\n**Steps to Reproduce**\n\n1. Log in to an account.\n2. Go to Projects and Create a new task or open an existing task.\n3. Upload the following SVG file as an attachment:\n\n```\n<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<svg\n onload=\"alert(localStorage.getItem('token'))\"\n xmlns=\"http://www.w3.org/2000/svg\">\n</svg>\n\n```\n4. After uploading ,save the Task and open the project , copy the direct URL of the attachment.\n5. Open the attachment URL in a new browser tab.\n6. The embedded JavaScript executes immediately and displays the authentication token stored in `localStorage`.\n\nThis confirms that arbitrary JavaScript embedded in an uploaded SVG file executes within the application's context.\n\n**Impact**\n\nThis vulnerability is classified as **Stored Cross-Site Scripting (XSS).**\n\n**Potential impact includes:**\n\nExecution of arbitrary JavaScript in a victim’s browser.\nExposure of authentication tokens.\nPotential account takeover.\nAbility to perform authenticated actions on behalf of the victim.\nPossible privilege escalation if higher-privileged users open the malicious attachment.\nAny authenticated user who accesses a malicious SVG attachment may be affected.\n\n**Recommendations**\n\nThis vulnerability can be mitigated by implementing proper server-side sanitization of SVG uploads and preventing inline execution of uploaded files.\n\nSpecifically:\n\n- Sanitize all uploaded SVG files to remove <script> elements, event handlers (e.g., onload), and other executable content.\n- Serve attachments with Content-Disposition: attachment to prevent inline rendering.\n- Implement a strict Content Security Policy (CSP) to block script execution within uploaded files.\n- Store authentication tokens in HttpOnly, Secure cookies instead of localStorage to prevent JavaScript access.\n- Applying these controls will prevent stored XSS via SVG uploads and significantly reduce the risk of token exposure and account takeover.\n\n**Attachment**\n[Stored XSS Proof of concept.pdf](https://github.com/user-attachments/files/25414870/Stored.XSS.Proof.of.concept.pdf)\n\nA fix is available at https://github.com/go-vikunja/vikunja/releases/tag/v2.0.0.","format":"markdown","source":"ghsa"},{"lang":"en","text":"Vikunja: Stored XSS via Unsanitized SVG Attachment Upload Leads to Token Exposure in code.vikunja.io/api","format":"markdown","source":"go"},{"lang":"es","text":"Vikunja es una plataforma de gestión de tareas de código abierto y autoalojada. Antes de la versión 2.0.0, la aplicación permite a los usuarios subir archivos SVG como adjuntos de tareas. SVG es un formato basado en XML que soporta la ejecución de JavaScript a través de elementos como etiquetas","source":"nvd"}],"published":"2026-02-25T21:37:57.671Z","modified":"2026-06-17T10:27:24.153Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N","score":7.3,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N","score":7.3,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N","score":7.3,"rating":"HIGH"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"version":"< 2.0.0","status":"affected"}],"vendor":"go-vikunja","product":"vikunja","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","lastAffected":"0.24.6"}],"ecosystem":"Go","package":"code.vikunja.io/api","purl":"pkg:golang/code.vikunja.io/api","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected"}],"ecosystem":"Go","package":"code.vikunja.io/api","purl":"pkg:golang/code.vikunja.io/api","source":"go"},{"ranges":[{"status":"affected","fixed":"2.0.0"}],"vendor":"vikunja","product":"vikunja","cpe":"cpe:2.3:a:vikunja:vikunja:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/go-vikunja/vikunja/security/advisories/GHSA-7jp5-298q-jg98","tags":["advisory","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/user-attachments/files/25414870/Stored.XSS.Proof.of.concept.pdf","tags":["exploit","third-party-advisory","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://vikunja.io/changelog/vikunja-v2.0.0-was-released","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-27616","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/go-vikunja/vikunja","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/go-vikunja/vikunja/releases/tag/v2.0.0","tags":["web"],"sources":["ghsa","go"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-02-26T20:38:26.190Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-27616","url":"https://www.cve.org/CVERecord?id=CVE-2026-27616","licence":"CVE Terms of Use","modified":"2026-02-26T20:38:41.085Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-7jp5-298q-jg98","url":"https://github.com/advisories/GHSA-7jp5-298q-jg98","licence":"CC-BY-4.0","modified":"2026-03-09T01:12:53.754Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-4553","url":"https://pkg.go.dev/vuln/GO-2026-4553","licence":"CC-BY-4.0","modified":"2026-03-09T01:12:53.754Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-27616","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-27616","licence":"Public domain","modified":"2026-06-17T10:27:24.153Z"}],"updatedAt":"2026-11-25T22:59:14.905Z","epss":{"score":0.00505,"percentile":0.44727,"date":"2026-12-01T12:00:22.000Z"}}