Categories
CVE-2026-65914 medium CVSS 6.1

Cross-Site Scripting (XSS) in dompurify (CVE-2026-65914)

Summary

Cross-site scripting in dompurify (CVE-2026-65914). Risk of unauthorized operations or information disclosure. Exploitable via POST /sanitize. Mitigation: upgrade to 3.3.2 or later.

Original description

The description as published by the source.

Description

A mutation-XSS (mXSS) condition was confirmed when sanitized HTML is reinserted into a new parsing context using innerHTML and special wrappers. The vulnerable wrappers confirmed in browser behavior are script, xmp, iframe, noembed, noframes, and noscript. The payload remains seemingly benign after DOMPurify.sanitize(), but mutates during the second parse into executable markup with an event handler, enabling JavaScript execution in the client (alert(1) in the PoC).

Vulnerability

The root cause is context switching after sanitization: sanitized output is treated as trusted and concatenated into a wrapper string (for example, ... or other special wrappers) before being reparsed by the browser. In this flow, attacker-controlled text inside an attribute (for example or equivalent closing sequences for each wrapper) closes the special parsing context early and reintroduces attacker markup () outside the original attribute context. DOMPurify sanitizes the original parse tree, but the application performs a second parse in a different context, reactivating dangerous tokens (classic mXSS pattern).

PoC

  1. Start the PoC app:
npm install
npm start
  1. Open http://localhost:3001.
  2. Set Wrapper en sink to xmp.
  3. Use payload:
 ">
  1. Click Sanitize + Render.
  2. Observe:
  • Sanitized response still contains the `` sequence inside alt.
  • The sink reparses to include ``.
  • alert('expoc') is triggered.…

Source: GitHub Security Advisories (Global) NVD GitHub Advisory

Auto-generated summary

Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.

A vulnerability tracked as CVE-2026-65914 has been found in dompurify.
Attackers can target a specific entry point like POST /sanitize over the network to misuse the product.
Risk of unauthorized operations or information disclosure. CVSS score: 6.1/10.
What to do: upgrade dompurify to 3.3.2 or later.
If unsure, ask your IT team or search "dompurify CVE-2026-65914" on the vendor's site.

CVE-2026-65914 (dompurify) — CWE-79 / CVSS v3 6.1
Attack vector: remote (network-reachable) / unauthenticated
Attack surface: POST /sanitize / innerHTML / script / xmp
Patched: 3.3.2 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.

❓ What is the problem

Cross-site scripting (XSS) (CWE-79) exists in dompurify. Attackers reach the vulnerable code path via POST /sanitize without authentication.

📍 Affected scope

Check the vendor advisory for the affected versions of dompurify. Attack surface: POST /sanitize / innerHTML / script / xmp.

🔥 Severity

Severity: Medium (CVSS 6.1/10). Risk of unauthorized operations or information disclosure.

🔧 How to fix

Update to 3.3.2.

🛡️ Workaround

Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.

🔍 Detection

Search webserver/proxy logs for unusual POST /sanitize requests with malformed payloads or SQL meta-characters. Run grep -r 'dompurify' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.

Response actions

Concrete steps and command examples for SOC/SRE teams to execute in order

  1. 1
    Identify exposure identify
    grep -r 'dompurify' . | grep -v node_modules

    リポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で dompurify を grep し、稼働しているサービス・バージョンを把握する。

  2. 2
    Hunt for indicators of compromise detect
    grep 'POST /sanitize' /var/log/nginx/access.log | grep -E '(unusual_payload|sqli_pattern)'

    アクセスログで POST /sanitize への異常なリクエスト (不正な認証ヘッダ・SQLメタ文字)を過去 30〜90日分捜索。WAF/SIEM があれば該当パスのアラート発火履歴を確認。

  3. 3
    Apply patch patch
    Upgrade dompurify to 3.3.2

    ステージング環境で 3.3.2 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスと、Step 2 で見つけた異常検知の続報チェックを含めること。

  4. 4
    Post-deployment verification verify
    Replay attack against POST /sanitize on staging to confirm patch closes the vector

    パッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番では Step 2 と同じログクエリでアラート再発が無いか継続監視。

Affected packages

npm dompurify
[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.3.2"}]}]

Fix status by distribution

Fixed packages published by each distribution for this CVE

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details