Skip to content

build(deps): bump dompurify and handlebars - #11424

Merged
fzaninotto merged 1 commit into
masterfrom
fix/bump-dompurify-lerna
Oct 25, 2026
Merged

fzaninotto merged 1 commit into
masterfrom
fix/bump-dompurify-lerna

Conversation

@fzaninotto

Copy link
Copy Markdown
Member

Problem

Dependabot reports 3 open critical advisories on two packages:

Package Current Advisory Severity
dompurify 3.4.16 GHSA-cg2g-xh64-v4q7 — SAFE_FOR_TEMPLATES bypass through attached shadow roots 9.2
handlebars 4.7.9 GHSA-p8wg-vrv2-v86f — Function constructor reachable despite the prototype deny list 9.2
handlebars 4.7.9 GHSA-8r5x-fm3f-whwj — JS injection via AST type confusion in compile() 9.8

Neither is exploitable in react-admin as it stands:

  • RichTextField is the only dompurify caller, and it sanitizes without SAFE_FOR_TEMPLATES, IN_PLACE or RETURN_DOM, which are the preconditions of the bypass.
  • handlebars is only a transitive dev dependency, pinned by lerna, which never compiles a template coming from untrusted input.

The advisories should still be cleared so the alerts stop masking real ones, and so consumers of ra-ui-materialui get the patched dompurify.

Solution

  • dompurify 3.4.16 → 3.4.17. The range in ra-ui-materialui is raised from ^3.2.4 to ^3.4.17, so that consumers resolve the patched version rather than only our lockfile.
  • lerna 10.0.1 → 10.1.1, which pins handlebars 4.7.10 instead of 4.7.9. Bumping lerna avoids carrying a resolutions entry for a transitive dev dependency. Note that this minor lerna bump carries major bumps of its npm internals (@npmcli/arborist 9 → 10, libnpmaccess 10 → 11, libnpmpublish 11 → 12, npm-packlist 10 → 11), which is why the lockfile diff is large — that code path is lerna publish.

No source change, so no new test or story.

How To Test

yarn install
yarn jest packages/ra-ui-materialui/src/field/RichTextField.spec.tsx   # 21 passing
yarn lerna ls                                                          # 19 packages found
yarn lerna changed                                                     # 19 packages ready to publish

yarn why handlebars should report 4.7.10, and yarn why dompurify 3.4.17.

As the lerna bump touches the release tooling, a lerna publish --dry-run by someone holding publish rights would be worth doing before merging.

Additional Checks

  • The PR targets master for a bugfix or a documentation fix, or next for a feature
  • The PR includes unit tests (if not possible, describe why) — dependency bump only; the existing RichTextField suite covers the dompurify usage
  • The PR includes one or several stories (if not possible, describe why) — no UI change
  • The documentation is up to date — no public API change

Generated by Claude Code

- dompurify 3.4.16 -> 3.4.17 (GHSA-cg2g-xh64-v4q7, SAFE_FOR_TEMPLATES
  bypass through attached shadow roots). dompurify is a runtime
  dependency of ra-ui-materialui, so the range is raised to ^3.4.17 to
  make sure consumers get the patched version too.
- lerna 10.0.1 -> 10.1.1, which pins handlebars 4.7.10 instead of 4.7.9
  (GHSA-p8wg-vrv2-v86f, GHSA-8r5x-fm3f-whwj: prototype deny-list bypass
  and AST type confusion). Bumping lerna avoids carrying a yarn
  resolution for a transitive dev dependency.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TFj4Pu8BhJfsAPUz8va8Mw
@fzaninotto
fzaninotto merged commit a85ba6b into master Oct 25, 2026
15 checks passed
@fzaninotto
fzaninotto deleted the fix/bump-dompurify-lerna branch October 25, 2026 14:30
@fzaninotto fzaninotto added this to the 5.15.6 milestone Oct 25, 2026
@fzaninotto fzaninotto changed the title Fix critical security advisories in dompurify and handlebars Bump dompurify and handlebars Oct 25, 2026
@fzaninotto fzaninotto changed the title Bump dompurify and handlebars bum(deps): Bump dompurify and handlebars Nov 7, 2026
@fzaninotto fzaninotto changed the title bum(deps): Bump dompurify and handlebars builddeps): bump dompurify and handlebars Nov 7, 2026
@fzaninotto fzaninotto changed the title builddeps): bump dompurify and handlebars build(deps): bump dompurify and handlebars Nov 7, 2026
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.

1 participant