Skip to content

Stored Cross-Site Scripting (XSS) in kanboard-plugin-wiki file viewer #11361

Backlog

Description

@N3o-Qwerty

Template/file_viewer/show.php in funktechno/kanboard-plugin-wiki renders text-file attachment content without HTML escaping:


Kanboard core's equivalent template uses $this->text->e($content) for escaping, but the plugin's template override (Plugin.php:55, setTemplateOverride) omits it.

A user with the Project Member role can upload a .txt file containing JavaScript to a wiki page. When another user previews the file via /wiki/file/<file_id>, the script executes in their browser, enabling session theft and privilege escalation.

Steps to reproduce:

  1. As a project member, upload poc.txt containing <script>alert(document.domain)</script> to a wiki page
  2. As another user, click "View file" on poc.txt
  3. The script executes

Fix: change line 12 of Template/file_viewer/show.php from

 to 
text->e($content) ?>

Affected: all versions through commit 1ea154b
Repository: https://github.com/funktechno/kanboard-plugin-wiki

ref ; https://github.com/funktechno/kanboard-plugin-wiki

credit josh t.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions