fix(security): bump dompurify to 3.4.11 (XSS / prototype pollution in HTML sanitizer)
Summary
[email protected] is our runtime HTML sanitizer for untrusted external content — RSS/news feed HTML and AI-generated output — used via DOMPurify.sanitize() in:
src/utils/widget-sanitizer.tssrc/components/DeductionPanel.tssrc/components/ChatAnalystPanel.ts
Snyk flags 7 advisories against this version — XSS, prototype pollution, and trust-boundary violations:
| Advisory | Type | Fixed in |
|---|---|---|
| CVE-2026-49978 / SNYK-JS-DOMPURIFY-17342528 | Cross-site Scripting | 3.4.7 / 3.4.8 |
| CVE-2026-49458 / SNYK-JS-DOMPURIFY-17344516 | Trust Boundary Violation | 3.4.6 / 3.4.7 |
| CVE-2026-49459 | Prototype Pollution | 3.4.6 |
| SNYK-JS-DOMPURIFY-17344549 | Cross-site Scripting | 3.4.8 |
| SNYK-JS-DOMPURIFY-17375136 | Improper Initialization | 3.4.11 |
This one matters more than its "medium" label suggests: it's the sanitizer sitting directly in the untrusted-content render path that SECURITY.md relies on ("External content (RSS feeds, news) is sanitized before rendering"). A bypass here is exactly the XSS vector that sanitizer exists to close. (Snyk marks it isRuntime:false, which is wrong for a bundled client lib — it ships in the browser bundle.)
Fix
Bump to 3.4.11 — the highest fixed version, same 3.x major, no API change. --package-lock-only update; diff is package.json + package-lock.json only.
Type of change
- [x] Bug fix (security)
Verification
3.4.11 ≥ every listed fixed version (3.4.6–3.4.11), so all 7 advisories clear. No API surface change within the 3.x line; the existing DOMPurify.addHook(...) / DOMPurify.sanitize(html, PURIFY_CONFIG) usage is unaffected.
🤖 Generated with Claude Code
The latest updates on your projects. Learn more about Vercel for GitHub.
| Project | Deployment | Actions | Updated (UTC) |
|---|---|---|---|
| worldmonitor | Preview, Comment | Jun 26, 2026 6:52am |
Greptile Summary
Bumps dompurify from 3.4.1 to 3.4.11 to clear 7 Snyk advisories (XSS, prototype pollution, trust-boundary violations, and improper initialization) that affect the runtime HTML sanitizer sitting directly in the untrusted-content render path for RSS feeds and AI-generated output. Only package.json and package-lock.json are changed; no source files or API surfaces are touched.
package.json: Minimum semver range tightened from^3.4.0→^3.4.11, preventing any futurenpm installfrom resolving back to a vulnerable patch.package-lock.json: Resolved version updated from3.4.1→3.4.11with a new sha512 integrity hash; Snyk and the npm registry both confirm3.4.11as the current latest non-vulnerable release.
Confidence Score: 5/5
Safe to merge — two manifest files updated, no source code changes, and the new version is confirmed as the current non-vulnerable release on npm and Snyk.
The change is a targeted patch to the dompurify version in both package manifests. The resolved version (3.4.11) is confirmed on npm and by the Snyk advisory database as the latest non-vulnerable release. The semver range in package.json is tightened to ^3.4.11, preventing any future install from resolving back to a patched-over version. No source files are touched and the DOMPurify 3.x API used by the codebase (addHook / sanitize) is unchanged across the 3.4.x line.
No files require special attention.
Important Files Changed
| Filename | Overview |
|---|---|
| package.json | Bumps the dompurify semver range from ^3.4.0 to ^3.4.11, ensuring the resolved version is 3.4.11 or higher within the 3.x line. |
| package-lock.json | Pins the dompurify resolved version to 3.4.11 with an updated sha512 integrity hash; no other dependency changes. |
Sequence Diagram
%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
participant Source as External Source (RSS / AI Output)
participant Sanitizer as widget-sanitizer.ts / DeductionPanel.ts / ChatAnalystPanel.ts
participant DOMPurify as DOMPurify 3.4.11 (was 3.4.1)
participant DOM as Browser DOM
Source->>Sanitizer: raw HTML string
Sanitizer->>DOMPurify: DOMPurify.sanitize(html, PURIFY_CONFIG)
Note over DOMPurify: Applies addHook rules. CVE-2026-49978, CVE-2026-49458, CVE-2026-49459 etc. now patched
DOMPurify-->>Sanitizer: sanitized HTML
Sanitizer-->>DOM: safe innerHTML / rendered output
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
participant Source as External Source (RSS / AI Output)
participant Sanitizer as widget-sanitizer.ts / DeductionPanel.ts / ChatAnalystPanel.ts
participant DOMPurify as DOMPurify 3.4.11 (was 3.4.1)
participant DOM as Browser DOM
Source->>Sanitizer: raw HTML string
Sanitizer->>DOMPurify: DOMPurify.sanitize(html, PURIFY_CONFIG)
Note over DOMPurify: Applies addHook rules. CVE-2026-49978, CVE-2026-49458, CVE-2026-49459 etc. now patched
DOMPurify-->>Sanitizer: sanitized HTML
Sanitizer-->>DOM: safe innerHTML / rendered output
Reviews (1): Last reviewed commit: "fix(security): bump dompurify to 3.4.11 ..." | Re-trigger Greptile