Backbone-undo/underscore security advisory
I'm also wondering if backbone-undo is needed or can be replaced by something similar. The package hasn't been updated for 6 years
Read full answer below ↓Question
Version:
v0.17.3
Are you able to reproduce the bug from the demo?
- Yes
- No
What is the expected behavior? See below
What is the current behavior?
There is a known security vulnerability in one of the versions of underscore used by a nested dependency.
The current version of grapejs utilises backbone-undo ^0.2.5
https://github.com/artf/grapesjs/blob/d7f773202c72710dd787e2ce418c114c9ef81986/package.json#L20
The latest version of which is 0.2.5 via npm
Version 0.2.5 of backbone-undo has a fixed limit on the underscore version;
"underscore": "1.4.4 - 1.8.3"
Which looks to be vulnerable based on this advisory https://github.com/advisories/GHSA-cf4h-3jhx-xvhq
Version 0.2.6 of backbone-undo does update this, but as mentioned is not available via npm
Are you able to attach screenshots, screencasts or a live demo?
- Yes
- No
Answers (4)
I'm also wondering if backbone-undo is needed or can be replaced by something similar. The package hasn't been updated for 6 years
The package hasn't been updated for 6 years
Well, except updating its dependencies (like in this case, for security reason) it's a feature-complete library, there is no need to add/update anything else.
Anyway, this PR seems to fix the security vulnerability at the .lock level but I'm not sure if are kept on a fresh install.
I know that yarn has resolutions for such cases but not sure about alternatives in npm.
Thanks for your reply
Anyway, this PR seems to fix the security vulnerability at the .lock level but I'm not sure if are kept on a fresh install.
I think that might fix the version in the main grapejs repo, but I'm not sure it restricts the one imported via backbone-undo.
If you set up a fresh project via
yarn init
yarn add grapesjs
the new yarn.lock will still reference both versions;
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
backbone-undo@^0.2.5:
version "0.2.5"
resolved "https://registry.yarnpkg.com/backbone-undo/-/backbone-undo-0.2.5.tgz#55b25230f90319ca622465e89a80248b893c2ce2"
integrity sha1-VbJSMPkDGcpiJGXomoAki4k8LOI=
dependencies:
backbone "1.0.0 - 1.2.1"
underscore "1.4.4 - 1.8.3"
...
grapesjs@^0.17.4:
version "0.17.4"
resolved "https://registry.yarnpkg.com/grapesjs/-/grapesjs-0.17.4.tgz#4baf69598b74a2e58c5133d9ab85631cf4de53e1"
integrity sha512-oBFCg88KpUKly4LCf+FG42f0kbIKBbkilpyBr+2aggnLRpeSYFv3Db+fQIG+H1Y345QVqKbi/IKEUJe5X0wuiw==
dependencies:
backbone "1.3.3"
backbone-undo "^0.2.5"
cash-dom "^2.3.9"
codemirror "^5.58.2"
codemirror-formatting "^1.0.0"
keymaster "^1.6.2"
promise-polyfill "^8.1.3"
spectrum-colorpicker "^1.8.0"
underscore "^1.9.1"
...
"[email protected] - 1.8.3":
version "1.8.3"
resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.8.3.tgz#4f3fb53b106e6097fcf9cb4109f2a5e9bdfa5022"
integrity sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=
underscore@>=1.7.0, underscore@>=1.8.3, underscore@^1.9.1:
version "1.13.1"
resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.13.1.tgz#0c1c6bd2df54b6b69f2314066d65b6cde6fcf9d1"
integrity sha512-hzSoAVtJF+3ZtiFX0VgfFPHEDRm7Y/QPjGyNo4TVdnDTdft3tr8hEkD25a1jC+TjTuE7tkHGKkhwCgs9dgBB2g==
Thanks for reporting this, @chilled-capybara.
Security and dependency issues are important. The GrapesJS team actively works on keeping dependencies up-to-date.
For you right now:
- Run
npm audit fixto see available patches - Check for a newer GrapesJS version that may have already addressed this
- If available, test the latest stable release before upgrading
- If the vulnerability is critical,
npm audit fix --forceis an option, but test thoroughly
Understanding the risk:
- Review the specific vulnerability details on GitHub Security Advisories
- Not all high-severity issues affect your code path
- Some vulnerabilities only trigger under specific conditions
Staying current:
- Watch for new GrapesJS releases
- Subscribe to security notifications on the repo
- The team prioritizes security updates in their release cycle
Related Questions and Answers
Continue research with similar issue discussions.
Issue #6687
Dependency: backbone-undo is deprecated (npm) — any plan to replace/remove?
GrapesJS version 0.22.14 (latest release as of 2025-11-20) What's the expected behavior? No deprecated dependencies in the GrapesJS install...
Issue #6723
Dependency: grapesjs >=0.21.13 Depends on vulnerable versions of underscore
GrapesJS version [x] I confirm to use the latest version of GrapesJS What browser are you using? Edge, mozilla Reproducible demo link NA De...
Issue #5743
XSS vulnerability in iframe attribute src
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Edge v122 Reproducible demo link https://j...
Issue #3622
I18n functionality
Version: latest Are you able to reproduce the bug from the demo?[] Yes[ ] No What is the expected behavior? to editor.I18n.setLocale("es")...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.
Browse free plugins →Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.
Browse premium plugins →Related tutorials
In-depth guides on the same topic.
Tutorial
Find the Right GrapesJS Plugin in Seconds: Smarter Discovery Is Live
We're shipping a set of discovery upgrades. New label filters, a proper compatibility switch for GrapesJS vs Studio, one-click and a smarter sort bar.
Tutorial
AutographJS - Signature Solution for Modern Web Editors
The Problem: Signature Capture Is Still Harder Than It Should Be
Tutorial
ScribeJS: Lightweight Inline Rich Text Editor
In the world of web development, rich text editors often feel bulky, slow, and difficult to integrate.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.