#504 An embed’s treats the timeline title as a replacement pattern
–
- github
- github/openchronology/timeline-app
- github/openchronology/timeline-app#504
- issue
- state:closed
**Embed ` `: the timeline title is used as a String.replace replacement pattern** - **Severity: Informational.** It cannot inject markup, but a title can make the embed page's title balloon. - **Affected:** platform embeds. - **Location:** `platform/app/embed/[id]/route.js:39-42`. - **Description:** `html.replace(/ … /, \` ${escape(title)}…\`)` passes a string, so `$'`, `` $` `` and `$&` in a timeline's title are expanded. `escape()` does not escape `$`. A title of `x $' y` copies the rest of dist/index.html (75 KB) into the ` ` element (title.mjs: the document grows from 75,254 to 149,160 bytes). Inside the RCDATA ` ` this is inert text, because dist/index.html contains only one ` `. If a later build adds an SVG ` ` after the head, duplicated trusted markup (including the app's script tag) would be parsed twice and break the embed. No attacker markup is ever injected. - **Suggested fix:** pass a replacer function: `.replace(re, () => …)`. editor-html.js already does this for the user-controlled parts. - **Confidence:** confirmed. --- From the security review of 2026-11-06 (commit 6776c44), finding I-3: hardening or information, filed publicly because it describes no way in. The exploitable findings are private security advisories. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_011fFY8eruEi1xAkkMBni13B https://github.com/openchronology/timeline-app/issues/504
Related
Open #504 An embed’s treats the timeline title as a replacement pattern in the timeline