Dev.to Security 🔐 Cybersecurity 👁 0 📖 2 min read

CVE-2026-64670: CVE-2026-64670: Stored Cross-Site Scripting in @waline/client Comment Editor Preview

CVE-2026-64670: Stored Cross-Site Scripting in @waline/client Comment Editor Preview Vulnerability ID: CVE-2026-64670 CVSS Score: 9.3 Published: 2026-11-25 A stored cross-site scripting (XSS) vulnerability in @walin

CVE-2026-64670: CVE-2026-64670: Stored Cross-Site Scripting in @waline/client Comment Editor Preview

CVE-2026-64670: Stored Cross-Site Scripting in @waline/client Comment Editor Preview

Vulnerability ID: CVE-2026-64670
CVSS Score: 9.3
Published: 2026-11-25

A stored cross-site scripting (XSS) vulnerability in @waline/client allows unauthenticated attackers to execute arbitrary JavaScript in the context of an administrator's browser session. The flaw exists because the client-side markdown preview renderer utilizes the marked library without HTML sanitization and injects the resulting output directly into the DOM via Vue's v-html directive. When an administrator opens the edit interface for a comment, the preview element is mounted and evaluated immediately due to the combination of watchImmediate and v-show, leading to automatic payload execution and administrative token compromise.

TL;DR

Unauthenticated attackers can post malicious comments containing inline event handlers (such as ). Although sanitized for regular public viewing on the server side, the raw comment body is returned when an administrator clicks 'Edit'. The @waline/client component parses this raw body without sanitization and mounts it into a hidden preview DOM container, automatically executing the payload and allowing attackers to exfiltrate administrative JWTs from localStorage.

⚠️ Exploit Status: POC

Technical Details

  • Vulnerability Type: Stored Cross-Site Scripting (CWE-79 / CWE-116)
  • CVSS v3.1 Score: 9.3 Critical (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N)
  • Affected Component: @waline/client (CommentBox.vue and utils/markdown.ts)
  • Attack Vector: Unauthenticated HTTP POST to /api/comment triggered on admin Edit
  • EPSS Score: 0.38% (24.25th percentile)
  • Exploit Status: Public Proof-of-Concept Available (GHSA-crj3-q72p-ggqm)
  • CISA KEV Status: Not Listed
  • Primary Impact: Administrative Account Takeover via localStorage JWT Exfiltration

Affected Systems

  • @waline/client
  • @waline/vercel
  • @waline/client: <= 3.15.2 (extended advisory tracking <= 3.16.2)
  • @waline/vercel: 1.31.9 - 1.31.12, 1.36.1, 1.40.0 - 1.40.1

Exploit Details

  • GitHub Security Advisory: Official advisory disclosing the complete proof-of-concept payload and step-by-step exploitation mechanics to extract localStorage.WALINE_USER.

Mitigation Strategies

  • Sanitize all client-side markdown parser output using DOMPurify before binding to Vue v-html directives.
  • Replace v-show with v-if on the markdown preview container in CommentBox.vue to avoid mounting hidden untrusted DOM nodes.
  • Enforce a strict HTTP Content Security Policy (CSP) that disallows 'unsafe-inline' scripts and restricts connect-src to trusted API domains.
  • Avoid clicking the 'Edit' button on untrusted comments from the web UI until client-side sanitization or CSP controls are verified.

Remediation Steps:

  1. Add dompurify and @types/dompurify dependencies to @waline/client and wrap the return value of marked.parse() in DOMPurify.sanitize() inside packages/client/src/utils/markdown.ts.
  2. Modify packages/client/src/components/CommentBox.vue line 616 from v-show="showPreview" to v-if="showPreview".
  3. Deploy a Content-Security-Policy response header (e.g., default-src 'self'; script-src 'self'; object-src 'none') on all web pages hosting the Waline client component.
  4. Rotate administrative credentials and invalidate existing JWT sessions if comment moderators have edited untrusted comments prior to mitigation.

References

Read the full report for CVE-2026-64670 on our website for more details including interactive diagrams and full exploit analysis.

📰 Read the original article on Dev.to Security

Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.