CVE-2026-17496: Verified Reproduction
CVE-2026-17496: NoteGen chat preview XSS via unsanitized HTML rendering before 0.32.0
CVE-2026-17496 is verified against note-gen · github. Affected versions: NoteGen before 0.32.0. Fixed in 0.32.0. Vulnerability class: XSS. This high reproduction includes runnable sandbox proof, artifacts, and a plain-text agent view under REPRO-2026-00304.
What Is CVE-2026-17496?
CVE-2026-17496 is a high-severity XSS vulnerability affecting note-gen NoteGen before 0.32.0. Pruva has independently reproduced it and publishes a verified, runnable proof-of-concept (reproduction REPRO-2026-00304).
CVE-2026-17496 Severity
CVE-2026-17496 is rated high severity.
High — serious impact or readily exploitable. Prioritize remediation.
Affected note-gen Versions
note-gen · github versions NoteGen before 0.32.0 are affected.
How to Reproduce CVE-2026-17496
pruva-verify REPRO-2026-00304 curl -O https://pruva.dev/api/v1/reproductions/REPRO-2026-00304/artifacts/bundle/repro/reproduction_steps.sh && chmod +x reproduction_steps.sh && ./reproduction_steps.sh Proof of Reproduction for CVE-2026-17496
- reached the target end-to-end
- full exploit chain demonstrated
- on the real production code path
- high confidence
- the upstream fix blocks the same trigger
malicious Skill REFERENCE.md prompt content inducing model output containing iframe srcdoc HTML
- NoteGen chat-preview UI component renders AI chat response via ChatPreview/dangerouslySetInnerHTML
reproduction_steps.sh How the agent worked
Root Cause and Exploit Chain for CVE-2026-17496
NoteGen before 0.32.0 rendered AI chat responses in the chat preview with markdown-it configured as html: true and then inserted the generated HTML into the DOM with React dangerouslySetInnerHTML. Attacker-controlled prompt material, such as a malicious Skill REFERENCE.md that induces the model to emit HTML, can therefore become executable markup in the NoteGen webview/chat UI. The current reproduction drives the real NoteGen ChatPreview component in vulnerable and fixed builds and shows that the vulnerable parent of the v0.32.0 fix executes attacker-supplied iframe srcdoc JavaScript while the fixed commit reaches the same chat-preview path without executing the payload.
- Package/component affected: NoteGen chat UI, specifically
src/app/core/main/chat/chat-preview.tsxand the chat-preview rendering path used for AI/model responses. - Affected versions: NoteGen before 0.32.0. The reproduction anchors the vulnerable build to fixed commit parent
70dfd0042f56f24dc29df710f6dd2e009731e6a4and the fixed negative control toae3ba948c41d8a74b4a20f4c6f26fcdda2002298. - Risk level and consequences: high. If attacker-controlled content reaches the model prompt and the model emits executable HTML, the chat preview can execute script in the privileged NoteGen webview/UI context. The proof uses an iframe
srcdocpayload that writes a unique marker into the page, demonstrating XSS-style script execution.
Impact Parity
- Disclosed/claimed maximum impact: chat-preview XSS from unsanitized HTML rendering of AI chat responses induced by attacker-controlled content.
- Reproduced impact from this run: XSS-style JavaScript execution in the NoteGen chat-preview DOM path. Two vulnerable attempts executed unique attacker-controlled markers, and two fixed attempts reached the same prompt/model/chat-preview path without marker execution.
- Parity:
fullfor the claimed XSS behavior. - Not demonstrated: no OS command execution, persistence, credential theft, or privilege escalation was attempted or claimed for this CVE.
Root Cause
In the vulnerable parent commit, src/app/core/main/chat/chat-preview.tsx constructs a MarkdownIt renderer with html: true, renders the AI response text, stores the rendered HTML in component state, and inserts it into the DOM with dangerouslySetInnerHTML. This permits raw HTML emitted by the model to become live DOM nodes instead of escaped text. The script verifies this source path before runtime execution by checking that the vulnerable commit contains new MarkdownIt({ html: true, ... }) and dangerouslySetInnerHTML in chat-preview.tsx.
The fixed commit ae3ba948c41d8a74b4a20f4c6f26fcdda2002298 replaces this renderer path with StreamdownRenderer. In the fixed runtime, the same model-output text and chat-preview route are reached, but the iframe/srcdoc payload is not inserted as executable DOM and no XSS marker is created.
Reproduction Steps
- Run
bundle/repro/reproduction_steps.shfrom any directory. The script honorsPRUVA_ROOTand otherwise discovers the bundle root. - The script reuses the prepared checkout at
/pruva/project-cache/repowhen available, resolves fixed commitae3ba948c41d8a74b4a20f4c6f26fcdda2002298and vulnerable parent70dfd0042f56f24dc29df710f6dd2e009731e6a4, verifies the vulnerable/fixed chat-preview source diff, installs pnpm/Puppeteer in a user-writable scratch directory, and installs NoteGen frontend dependencies in isolated worktrees. - For each build, it starts the real NoteGen Next UI, opens
/pruva-chat-preview-xssin headless Chromium, and renders the unmodified productionChatPreviewcomponent with a model response induced by attacker-controlled SkillREFERENCE.mdtext. - Expected evidence: vulnerable attempts record
browser_window_marker_observed=true,document_xss_attr_observed=true, andxss_node_observed=true; fixed attempts record the prompt/model/chat-preview path as reached but all XSS marker fields remain false.
Evidence
Primary evidence files from the successful second run:
bundle/logs/reproduction_steps.log- top-level transcript showing both vulnerable and fixed UI runs completed and the final proof summary was printed.bundle/logs/repro/source_diff_chat_preview.log- source evidence that the vulnerable commit usesmarkdown-itwithhtml: trueanddangerouslySetInnerHTML, while the fixed commit usesStreamdownRenderer.bundle/logs/repro/vulnerable_attempt_1.logandbundle/logs/repro/vulnerable_attempt_2.log- browser runtime evidence for two vulnerable attempts.bundle/logs/repro/fixed_attempt_1.logandbundle/logs/repro/fixed_attempt_2.log- same-path fixed negative controls.bundle/artifacts/notegen-chat-preview-xss/proof_summary.json- structured summary:vulnerable_xss_count: 2,fixed_xss_count: 0.bundle/repro/runtime_manifest.json- runtime manifest withentrypoint_kind: open_document,service_started: true,healthcheck_passed: true, andtarget_path_reached: true.
Key excerpts:
- Vulnerable attempt 1:
prompt_reached_model_path=true,model_output_recorded=true,chat_preview_dom_reached=true,browser_window_marker_observed=true,document_xss_attr_observed=true,xss_node_observed=true, andxss_observed=true. - Vulnerable attempt 2: same successful marker execution with a distinct marker.
- Fixed attempt 1:
prompt_reached_model_path=true,model_output_recorded=true,chat_preview_dom_reached=true, butbrowser_window_marker_observed=false,document_xss_attr_observed=false,xss_node_observed=false, and no raw iframe/srcdoc remained in the rendered preview. - Fixed attempt 2: same no-XSS fixed negative control with a distinct marker.
- HTTP response headers captured in attempt logs did not include a Content-Security-Policy header.
Recommendations / Next Steps
Upgrade NoteGen to v0.32.0 or later. Keep AI/model output rendering on a renderer that treats raw HTML as inert text or sanitizes it with a strict allow-list. Add regression tests around chat-preview rendering that feed model-output strings containing event handlers, iframes, srcdoc, SVG/event attributes, and script-like URLs, and assert that no executable DOM or event handler remains. If raw HTML is ever intentionally supported, enforce a restrictive sanitizer and a defensive Content-Security-Policy in the Tauri/webview context.
Additional Notes
The final reproduction script was executed twice consecutively and passed both times. It is idempotent: worktrees and package/browser caches are kept under /tmp/pruva-notegen-chat-preview-xss, while current-run evidence is written under bundle/logs/, bundle/artifacts/notegen-chat-preview-xss/, and bundle/repro/. The route used by the script is a minimal current-run UI route added to each worktree solely to drive the unmodified production ChatPreview component and compare the vulnerable/fixed rendering behavior through a real browser DOM runtime.
CVE-2026-17496 Reproduction Transcript
The agent's step-by-step process — every tool call, every handoff, the moment the exploit fired.
Full session Replay every step — scrub the timeline or play it back.
Artifacts and Evidence for CVE-2026-17496
Scripts, logs, diffs, and output captured during the reproduction.
How to Fix CVE-2026-17496
Upgrade note-gen · github to 0.32.0 or later.
FAQ: CVE-2026-17496
Is CVE-2026-17496 exploitable?
How severe is CVE-2026-17496?
Which versions of note-gen are affected by CVE-2026-17496?
Is there a fix for CVE-2026-17496?
How can I reproduce CVE-2026-17496?
Is the CVE-2026-17496 reproduction verified?
References for CVE-2026-17496
Authoritative sources for CVE-2026-17496 — official vulnerability databases and the upstream advisory. Pruva's reproduction verifies the issue firsthand; these are the primary records to corroborate it.