Skip to content

fix(dev-server-ui): update dompurify and uuid for security advisories - #881

Draft
nieblara wants to merge 1 commit into
mainfrom
cursor/dev-server-ui-dompurify-uuid-security-d81e
Draft

nieblara wants to merge 1 commit into
mainfrom
cursor/dev-server-ui-dompurify-uuid-security-d81e

Conversation

@nieblara

Copy link
Copy Markdown
Contributor

Requirements

  • I have added test coverage for new or changed functionality. Not applicable. This change updates only dependencies.
  • I have followed the repository's pull request submission guidelines
  • I have validated my changes against all supported platform versions

Related issues

This PR gives only the security fixes that the Dependabot group PR #779 names: dompurify and uuid. PR #779 also updates @launchpad-ui/components to 0.23, react-router to 8, vite to 8, and launchdarkly-js-client-sdk to 3.9.5. Its description does not name these updates. With them, npm ci fails on React 19 peer dependencies. This PR does not include these updates. PRs #740 and #777 used the same focused approach.

This PR does not close #779.

Describe the solution you've provided

Both packages are transitive dependencies of the dev server UI (internal/dev_server/ui).

Package Path Old New How
dompurify @launchpad-ui/core → @launchpad-ui/markdown → isomorphic-dompurify (^3.1.6) 3.2.4 3.4.16 Lockfile only
uuid launchdarkly-js-client-sdk 3.4.0 → launchdarkly-js-sdk-common 5.3.0 (^8.0.0) 8.3.2 11.1.1 Scoped npm override

The dompurify range ^3.1.6 already allows 3.4.16, so no override is necessary for dompurify. The uuid range ^8.0.0 does not allow a patched version. The only other fix is to update the JS SDK, which is out of scope. Thus, the PR adds this scoped override in package.json:

"launchdarkly-js-sdk-common": { "uuid": "11.1.1" }

launchdarkly-js-sdk-common calls only v1() from uuid, with no buffer argument. uuid 11 exports v1 for require. A local check loaded the module with uuid 11.1.1 and it worked.

The lockfile diff changes only the dompurify and uuid entries.

Advisories that this PR fixes:

PR #779 uses dompurify 3.4.13. GitHub published GHSA-6688-9rhm-gjv2 on Oct 5, 2026, after #779 opened. That advisory needs 3.4.16. Thus, 3.4.16 is the lowest version that clears all dompurify advisories.

npm audit in internal/dev_server/ui:

Low Moderate High Critical Total
Before (all dependencies) 1 10 14 2 27
After (all dependencies) 1 6 14 2 23
Before (--omit=dev) 0 8 0 0 8
After (--omit=dev) 0 4 0 0 4

The audit removed dompurify, uuid, launchdarkly-js-sdk-common, and launchdarkly-js-client-sdk from the report. The audit found no new advisories. The other findings were on main before this change, and this PR does not touch them.

Local checks in internal/dev_server/ui, with Node 22 and npm 10.9:

  • npm ci: pass
  • npm run lint: pass
  • npm run prettier:write: no changes
  • npm test: 5 tests pass
  • npm run build: pass. The committed dist/ did not change.

Describe alternatives you've considered

Additional context

The built dist/index.html did not change. The UI does not import @launchpad-ui/markdown, so the bundle does not contain dompurify. The prebuilt launchdarkly-js-client-sdk bundle contains its own copy of uuid 8 code. Thus, this PR clears the advisories from the installed dependency tree, but the shipped UI code stays the same. The SDK uses only uuid v1() without a buffer, so GHSA-w5hq-g745-h8pq does not apply to that code.

PR #880 also changes this lockfile. If a conflict occurs, rebase on main and regenerate the lockfile.

Open in Web Open in Cursor 

Update the transitive dompurify from 3.2.4 to 3.4.16 in the lockfile.
Add a scoped npm override that sets uuid to 11.1.1 for
launchdarkly-js-sdk-common. This is the focused security part of #779.

Co-authored-by: rniebla <rniebla@launchdarkly.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants