Summary
js/softwarecatalog-main.js ships DOMPurify 2.3.3, which is covered by 15 open advisories (XSS, mutation-XSS, sanitisation bypasses). It cannot be fixed by bumping a dependency, and a naive fix would produce a false green.
Why the obvious fix does not work
Dependabot / npm audit flag node_modules/@toast-ui/editor/node_modules/dompurify@2.5.9.
That copy is installed but never loaded. @toast-ui/editor inlines DOMPurify into its own dist at its build time and never require()s the dompurify package:
$ grep -c "require('dompurify')" node_modules/@toast-ui/editor/dist/toastui-editor.js
0
$ grep -oE "DOMPurify [0-9.]+" node_modules/@toast-ui/editor/dist/toastui-editor.js
DOMPurify 2.3.3
And it reaches the shipped bundle — from the production build's extracted licence banners:
$ grep -ohE "DOMPurify [0-9.]+" js/*.LICENSE.txt | sort | uniq -c
1 DOMPurify 2.3.3 <- inlined by @toast-ui/editor, in softwarecatalog-main.js
1 DOMPurify 3.4.12
3 DOMPurify 3.4.13
So adding an npm overrides entry for dompurify would silence the audit while the vulnerable code keeps shipping. That was deliberately not done in #443.
No upstream fix
@toast-ui/editor@3.2.2 is the latest release and still declares "dompurify": "^2.3.3". DOMPurify 2.x is end-of-life. The project has had no release since 3.2.2.
Reachability
Real. src/modals/object/ViewObject.vue imports { Editor } from '@toast-ui/editor' and renders user-supplied object content through it, which is exactly the sanitisation path the advisories target.
Options
- Replace
@toast-ui/editor with a maintained editor (largest change, cleanest outcome).
patch-package the toast-ui dist to delegate to the hoisted dompurify@3.4.13 — the v2 → v3 sanitize() surface toast-ui uses is broadly compatible. Needs testing of the editor's sanitiser hooks.
- Vendor a rebuilt toast-ui from source against dompurify 3.
Recommendation: option 2 as a stopgap, option 1 as the real fix.
Do not
Do not add a dompurify npm overrides entry to close this. It changes nothing that ships and removes the alert that tracks a genuine exposure.
Summary
js/softwarecatalog-main.jsships DOMPurify 2.3.3, which is covered by 15 open advisories (XSS, mutation-XSS, sanitisation bypasses). It cannot be fixed by bumping a dependency, and a naive fix would produce a false green.Why the obvious fix does not work
Dependabot /
npm auditflagnode_modules/@toast-ui/editor/node_modules/dompurify@2.5.9.That copy is installed but never loaded.
@toast-ui/editorinlines DOMPurify into its owndistat its build time and neverrequire()s thedompurifypackage:And it reaches the shipped bundle — from the production build's extracted licence banners:
So adding an npm
overridesentry fordompurifywould silence the audit while the vulnerable code keeps shipping. That was deliberately not done in #443.No upstream fix
@toast-ui/editor@3.2.2is the latest release and still declares"dompurify": "^2.3.3". DOMPurify 2.x is end-of-life. The project has had no release since 3.2.2.Reachability
Real.
src/modals/object/ViewObject.vueimports{ Editor } from '@toast-ui/editor'and renders user-supplied object content through it, which is exactly the sanitisation path the advisories target.Options
@toast-ui/editorwith a maintained editor (largest change, cleanest outcome).patch-packagethe toast-ui dist to delegate to the hoisteddompurify@3.4.13— the v2 → v3sanitize()surface toast-ui uses is broadly compatible. Needs testing of the editor's sanitiser hooks.Recommendation: option 2 as a stopgap, option 1 as the real fix.
Do not
Do not add a
dompurifynpmoverridesentry to close this. It changes nothing that ships and removes the alert that tracks a genuine exposure.