Repository navigation
fix(security): bump dompurify to patch DOM XSS advisory - #660
hitesh-shetty-cstk wants to merge 3 commits into
Conversation
release: v4.5.3 (Develop v4 -> stage v4)
release: v4.5.3
Bumps dompurify from 3.4.13/3.4.14 to 3.4.16 (direct dependency) in package.json and package-lock.json, resolving a Snyk-reported Cross-site Scripting (XSS) advisory in dompurify. Co-Authored-By: Claude <noreply@anthropic.com>
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The dependency declaration and lockfile metadata are consistent, with no unresolved issues found.
Review effort: Balanced
Findings: None
What changed in this PR
Updates the direct DOMPurify runtime dependency to a version containing the XSS security fix.
Changes:
- Bumps DOMPurify from
^3.4.13to^3.4.16. - Synchronizes resolved package and integrity metadata.
| File | Description |
|---|---|
package.json |
Updates the dependency range. |
package-lock.json |
Locks DOMPurify 3.4.16 and updates metadata. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Coverage Report
File CoverageNo changed files found. |
hitesh-shetty-cstk
left a comment
There was a problem hiding this comment.
Automated review
What this changes: Raises the dompurify range in package.json from ^3.4.13 to ^3.4.16 and updates the one matching entry in package-lock.json (version, resolved URL, integrity). No source file changes. The single call site, sanitizeData in src/visualBuilder/utils/collabUtils.ts, is untouched.
I checked the lockfile edit against the npm registry rather than taking it on trust:
dompurify@3.4.16exists and is the currentlatest.- The integrity hash in the lockfile matches the registry's published hash for 3.4.16 exactly, as does the resolved tarball URL. This is the check that matters most on a hand-edited lockfile.
- There is one
dompurifyentry in the lockfile, now at 3.4.16, andpackages[""].dependenciesagrees withpackage.json. A partial bump leaving a second entry on the old version is the usual failure mode here and it is not present. lockfileVersionis 3, so no legacydependenciesblock needs a parallel edit.
One note on what the manifest bump actually buys, because it is easy to read it as doing more or less than it does. ^3.4.13 already permitted 3.4.16, so a fresh install was resolving to a patched version regardless. What this adds is a floor, so a consumer cannot land on 3.4.13 or 3.4.14 from a stale lockfile, a pinned resolution, or an offline cache. That is the right lever for this repo: tsup.config.js sets no noExternal, and tsup leaves dependencies external by default, so dompurify stays an import in dist and each consumer resolves it from the declared range.
Business impact: None identified. The change does reach customers through the published package's dependency range, so it is fair to treat as customer-facing, but a patch-level dompurify bump carries no expected behavior change. The only call site passes USE_PROFILES: { html: true } and strips remaining tags before using the result.
Security: Remediation rather than a new finding. Snyk and the org security workflow both report clean on this head, and I found nothing they miss. The supply-chain question specific to an edited lockfile, whether the integrity hash matches the real published artifact, I verified directly against the registry.
Flow
No flow change. A dependency bump with no altered control flow or message path.
Findings: 0 blocker, 1 should fix, 1 nit. The should-fix is inline on package.json. The nit is here, because it concerns a different pull request and has no honest line to anchor to.
Nit: #634 is still open. It is lockfile-only and moves dompurify from 3.4.12 to 3.4.13, below the floor this sets. It edits the same lockfile lines, so it cannot merge quietly after this one, and Dependabot normally closes its own pull request once the dependency moves past its target. Worth closing by hand if it does not.
Reviewer candidates: @kirtesh-cstk authored 8 of the last 30 commits on package.json. @csAyushDubey authored 6.
Not covered: I did not run the build, the unit tests, or an install. The test check was still in progress when I read it; the other checks on this head had passed. I could not independently confirm the advisory's affected range or its first patched version, because both advisory databases I tried were unreachable from this run. That part rests on Snyk's clean result for this head rather than on my own reading of the advisory record.
Automated review by Claude Code. A human review is still required.
Generated by Claude Code
What the vulnerability was
Snyk SCA flagged
dompurify@3.4.13/3.4.14as vulnerable to a Cross-site Scripting (XSS) advisory.dompurifyis a direct runtime dependency here.Note: an earlier open PR (#634, dependabot) bumps
dompurifyto3.4.13, which does not reach the fixed version — this PR supersedes that with a sufficient bump.What the fix does
Bumps
dompurifyfrom^3.4.13to^3.4.16inpackage.json, and updates the correspondingnode_modules/dompurifyentry (version/resolved/integrity) plus the root package's declared range inpackage-lock.jsonto match.How it was verified
dompurifyis a direct dependency inpackage.json.overrides/resolutionsblock added — direct version bump only.🤖 Generated with Claude Code
Generated by Claude Code