/

CVE-2026-64670

Severity:

CRITICAL RISK

(9.3)

Stored Cross-Site Scripting (CWE-79) in Waline Editor

CVE-2026-64670

Deferred

Vulnerability type

Category:

Stored Cross-Site Scripting

CWE:

CWE-79, CWE-116

Impact:

Privilege escalation through script execution in a moderator's session

Severity:

CRITICAL RISK

(9.3)

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

Waline's comment editor renders Markdown previews without sanitizing the resulting HTML, and editing a comment can load its raw body into the preview. If an administrator edits an attacker's comment, the content may execute in the administrator's browser session.

Affected context

The issue affects the @waline/client comment editor in Waline versions 3.15.2 and prior. It occurs when the editor displays a comment's raw body as a live preview using unsanitized rendered HTML. Administrators and comment owners can edit comments; an administrator who opens an attacker's comment for editing may trigger the vulnerable rendering path.

Exploit preconditions

  • Attack surface: Waline's comment submission and editing interface
  • Required access: An attacker can submit a comment; the attacker does not need administrator access
  • Trigger point: An administrator opens the attacker's comment in the editor, causing its raw body to be rendered in the preview
  • Why exploitation is possible: Markdown output is not sanitized before it is inserted into the page with v-html

Why this happens

The editor converts comment content to HTML with a Markdown renderer and inserts the result into the page without sanitization. Seeding the editor with a comment's raw body exposes the same rendering path when an administrator edits that comment. This is a cross-site scripting flaw (CWE-79), with unsafe output handling also related to CWE-116: improperly encoded or sanitized data is interpreted as active browser content.

Potential impact

  • Script execution could occur in an administrator's browser session
  • An attacker may be able to perform actions available to the affected administrator
  • Sensitive information accessible to that session could be exposed
  • The site's integrity or administrative content could be affected

General mitigation guidance

Defensive patterns focus on treating all comment content as untrusted, including content shown in editing previews.

  • Sanitize rendered Markdown with a well-maintained HTML sanitizer and a restrictive allowlist
  • Prefer safe text rendering over raw HTML insertion when rich formatting is not required
  • Apply context-appropriate output encoding at the point where content enters the DOM
  • Keep preview rendering and edit-form initialization within the same sanitization boundary
  • Limit administrative privileges and reduce the impact of actions performed from moderator sessions

How teams detect issues like this

  • Use static analysis to identify unsanitized HTML insertion points such as v-html and trace whether their inputs are user-controlled
  • Review Markdown and rich-text rendering paths, especially editor previews and edit-form initialization
  • Enforce code-review or CI policies requiring approved sanitization before HTML reaches the DOM
  • Test previews with security-focused input cases and verify that active markup is neutralized
  • Automated code review tools may help flag unsafe rendering patterns for manual assessment

Sources

SourceLink
github.comgithub.com/walinejs/waline/security/advisories/GHSA-crj3-q72p-ggqm

Frequently asked

questions

An attacker can submit a comment without administrator access. The described attack depends on an administrator later opening that comment for editing.

The administrator's Edit action seeds the editor with the comment's raw body, which is then rendered in the live preview.

Sanitize rendered Markdown with a strict allowlist before inserting it as HTML, or render content as text when HTML formatting is not needed.

Treat user-authored content as untrusted throughout preview and editing flows, review raw HTML insertion points, and enforce sanitization checks in code review and automated testing.

Find out what's already
exploitable in your codebase.