/

CVE-2026-120697

Severity:

HIGH RISK

(8.7)

Stored Cross-Site Scripting (CWE-79) in Wiki.js Pages

CVE-2026-120697

Received

Vulnerability type

Category:

Stored Cross-Site Scripting

CWE:

CWE-79

Impact:

Execution of attacker-controlled JavaScript in a viewer's browser session

Severity:

HIGH RISK

(8.7)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Wiki.js can allow an authenticated user with page-writing access to store executable Vue expressions in certain page attributes. When another user views the page, those expressions may run in that user's browser under the Wiki.js origin, even if the author lacks script-writing or administrative permissions.

Affected context

The issue occurs when Wiki.js processes page HTML containing Vue directives in the v-slot:tabs or v-slot:content attributes. These directives are permitted by the HTML sanitization allowlist, and the resulting content is later compiled by the Vue 2 runtime compiler. Risk depends on an authenticated user being able to write pages and another user viewing the affected page.

Exploit preconditions

  • Attack surface: Wiki.js pages rendered in a viewer's browser
  • Required access: An authenticated account with write:pages permission; administrative access and write:scripts permission are not required
  • Trigger point: A viewer opens a page containing the stored attributes
  • Why exploitation is possible: Sanitization allows executable Vue directives that are later compiled as part of rendered page HTML

Why this happens

The renderer adds executable Vue directives to the DOMPurify allowlist, then passes the sanitized HTML to a Vue 2 runtime compiler. This allows attacker-controlled expressions in stored page content to execute in a viewer's browser. The issue maps to CWE-79: Improper Neutralization of Input During Web Page Generation (Cross-site Scripting) because untrusted content is not sufficiently constrained before being rendered as executable browser content.

Potential impact

  • Attacker-controlled script may read same-origin data available to the viewer
  • Script could modify displayed content or present phishing content
  • Script could perform actions available to the viewer
  • If a privileged user views the page, script could potentially invoke operations available to that user's session, including privileged GraphQL operations

General mitigation guidance

Defensive patterns focus on preventing untrusted page content from becoming executable:

  • Avoid passing untrusted HTML to runtime template compilers
  • Remove executable framework directives from sanitizer allowlists
  • Prefer rendering user-provided content as text or through a restricted, non-executable markup format
  • Apply strict schema and attribute allowlists based on the content's intended use
  • Limit page-writing permissions and apply least privilege to user roles
  • Use browser security policies, such as a carefully configured Content Security Policy, as defense in depth

How teams detect issues like this

  • Use static analysis to identify paths where sanitized HTML is passed to framework runtime compilers
  • Review sanitizer allowlists for executable directives, event handlers, and other active attributes
  • Test page rendering with security checks that verify user-controlled markup cannot execute in a browser
  • Enforce code-review and CI policies against compiling untrusted HTML or expanding active markup allowlists without review
  • Monitor for unusual same-origin actions associated with page views, while accounting for legitimate user activity

Sources

SourceLink
github.comgithub.com/requarks/wiki/commit/1161ddc6e6f4388a15d90278d55b099248ce6e79
github.comgithub.com/requarks/wiki/releases/tag/v2.5.315
github.comgithub.com/requarks/wiki/security/advisories/GHSA-98c8-px3r-68c6

Frequently asked

questions

An authenticated user with write:pages permission can create affected page content. The author does not need administrative permissions or write:scripts.

A viewer must open the affected page for the stored expressions to run in their browser. Any actions the script can take are limited by the viewer's session and access.

Do not compile untrusted page HTML as a framework template. Render user content as text or through a restricted format, and exclude executable directives from sanitization allowlists.

Treat page content as untrusted, restrict active markup, review rendering and compilation paths, and apply least-privilege permissions alongside browser security policies.

Find out what's already
exploitable in your codebase.