FixVibe

// プローブ / スポットライト

URLフラグメント経由のDOM型XSS

現代のSPAは location.hash を読んでDOMに書き込みます — 攻撃者のペイロードも一緒に乗ります。

概要

DOM-based XSS is XSS where the server is innocent. The bug lives entirely in your client-side JavaScript, and your server logs will never show a trace of the attack — the URL fragment after `#` never reaches the server. That makes it the form of XSS most likely to slip through both WAF and SOC. SPA frameworks have made it more common in production, not less: every router that reads location for state, every analytics tag that grabs query parameters, every 'remember the user's input' pattern that stores partial state in the URL is a candidate. The classic Reflected XSS that lived in server-rendered HTML has migrated client-side.

仕組み

DOM XSS appears when client-side JavaScript moves URL or state data into the page without safe encoding. The server may be clean while the shipped frontend creates the execution path.

被害範囲

Same as classical XSS — full JavaScript execution context inside your origin, with access to cookies (unless HttpOnly), localStorage, the DOM, and any auth tokens visible to JS. Account takeover via session theft, action hijack on behalf of the user, or a phishing overlay convincing enough that the user re-enters credentials inside the legitimate origin.

// what fixvibe checks

What FixVibe checks

FixVibe checks this class with verified-domain active testing that is bounded, non-destructive, and evidence-driven. Public reports describe the affected surface and remediation. For check-specific questions about exact detection heuristics, active payload details, or source-code rule patterns, contact support@fixvibe.app.

鉄壁の防御

Don't pass URL data to dangerous sinks. Use `textContent` for inserting text into the DOM. For frameworks, lean on the safe-by-default rendering — React's children, Vue's `{{ }}`, Angular's interpolation — and audit every `dangerouslySetInnerHTML`, `v-html`, and `[innerHTML]` for whether the input is trusted. When you genuinely need to render user-supplied HTML, sanitize through DOMPurify with a strict allowlist; never write your own sanitizer. Avoid `eval`, `setTimeout(string)`, `Function(string)`, `setInterval(string)` — anywhere a string-as-code is accepted. Apply a strict Content Security Policy without `unsafe-eval` and with `script-src 'self' 'strict-dynamic' 'nonce-…'` so even successful injection can't execute. As a sanity check, grep your codebase for `innerHTML\s*=` and `location\.hash` — every match is a code path to review.

// あなたのアプリで実行してみてください

FixVibe が見守る間も、安心して出荷を続けられます。

FixVibe は攻撃者と同じ視点で、あなたのアプリの公開面を徹底的にテストします —— エージェント不要、インストール不要、クレジットカード不要。新しい脆弱性パターンを継続的に研究し、実用的なチェックと Cursor、Claude、Copilot 向けの貼り付け可能な修正に変換します。

アクティブプローブ
103
このカテゴリで実行されるテスト
モジュール
27
専用の アクティブプローブ チェック
1スキャンごと
384+
全カテゴリ合計のテスト
  • 無料 —— カード不要、インストール不要、Slack 通知不要
  • URL を貼り付けるだけ —— クロール、検査、レポートはお任せ
  • 重大度別に分類、シグナルだけに重複排除
  • 最新の AI 修正プロンプトを Cursor、Claude、Copilot にそのまま貼り付け
無料スキャンを実行

// 最新チェック · 実用的な修正 · 安心してリリース

URLフラグメント経由のDOM型XSS — 脆弱性スポットライト | FixVibe · FixVibe