html-embed: minor hardening (strip root-node type-check; document client read-only relies solely on server strip) #30

Closed
opened 2026-06-20 20:31:54 +03:00 by Ghost · 0 comments

Found in security review of PR #16 (merged in 7a03321d).

Severity: nit.

  1. stripHtmlEmbedNodes only filters children; the root node itself is never type-checked (apps/server/src/common/helpers/prosemirror/html-embed.util.ts ~L33-41). Not exploitable in practice (the document root is always doc), but a defensive root-type check would make the helper total.
  2. Client read-only execution depends entirely on the server strip (html-embed-view.tsx:71). Correct by design, but it is the sole client-side safeguard for share viewers and deserves an explicit note/test.
Found in security review of PR #16 (merged in 7a03321d). **Severity: nit.** 1. `stripHtmlEmbedNodes` only filters children; the root node itself is never type-checked (`apps/server/src/common/helpers/prosemirror/html-embed.util.ts` ~L33-41). Not exploitable in practice (the document root is always `doc`), but a defensive root-type check would make the helper total. 2. Client read-only execution depends entirely on the server strip (`html-embed-view.tsx:71`). Correct by design, but it is the sole client-side safeguard for share viewers and deserves an explicit note/test.
Ghost closed this issue 2026-06-21 02:05:22 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: vvzvlad/gitmost#30