Repository navigation
Update dependency @tiptap/core to v3.30.4 [SECURITY] - autoclosed - #275
Closed
renovate[bot] wants to merge 1 commit into
Closed
renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
Contributor
Author
|
renovate
Bot
force-pushed
the
renovate/npm-tiptap-core-vulnerability
branch
from
September 10, 2026 03:20
caf4ed1 to
49c9fcf
Compare
renovate
Bot
force-pushed
the
renovate/npm-tiptap-core-vulnerability
branch
2 times, most recently
from
October 2, 2026 22:49
d104f54 to
782d493
Compare
renovate
Bot
force-pushed
the
renovate/npm-tiptap-core-vulnerability
branch
3 times, most recently
from
October 15, 2026 06:52
b95a864 to
dca8a2b
Compare
renovate
Bot
force-pushed
the
renovate/npm-tiptap-core-vulnerability
branch
3 times, most recently
from
November 11, 2026 18:10
98c61e2 to
0a3f996
Compare
renovate
Bot
force-pushed
the
renovate/npm-tiptap-core-vulnerability
branch
from
November 18, 2026 03:13
0a3f996 to
b28bdf7
Compare
renovate
Bot
force-pushed
the
renovate/npm-tiptap-core-vulnerability
branch
5 times, most recently
from
November 24, 2026 02:32
2765596 to
c45e230
Compare
renovate
Bot
force-pushed
the
renovate/npm-tiptap-core-vulnerability
branch
from
November 27, 2026 05:02
c45e230 to
9957129
Compare
renovate
Bot
force-pushed
the
renovate/npm-tiptap-core-vulnerability
branch
from
December 1, 2026 13:05
9957129 to
456edb2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
3.24.0→3.30.4Tiptap: mergeAttributes() turns an own proto key into inherited executable DOM attributes
GHSA-cp6q-959q-f8rh
More information
Details
Summary
@tiptap/core's publicmergeAttributes()helper uses ordinary bracket assignment on keys returned byObject.entries(). An own__proto__key from JSON therefore invokes the legacy prototype setter on the fresh merged object. The function returns an object whose prototype is attacker-controlled, whileObject.keys()and ordinary own-property checks show no attacker attributes.When that result is used as a ProseMirror DOMOutputSpec attribute object,
prosemirror-model'sDOMSerializer.renderSpec()enumerates it withfor...inand applies inherited values withsetAttribute(). In a browser proof, inheritedsrcandonerrorvalues were copied to an<img>and the error handler executed once. This is per-object prototype manipulation; the proof does not modify globalObject.prototype.Root cause
The affected loop is conceptually:
Object.entries(JSON.parse('{"__proto__": {...}}'))includes__proto__. ReadingmergedAttributes['__proto__']resolves the inheritedObject.prototype; assigning to the same key invokesObject.prototype.__proto__'s setter and replacesmergedAttributes' prototype.Browser reproduction
The following shape was tested with exact
@tiptap/core3.29.2 andprosemirror-model1.25.11:Chromium produced an image with
data-inherited-canary,src, andonerror; the handler executed exactly once.Object.prototyperemained clean.Impact and preconditions
Applications that merge untrusted imported document, plugin, CMS, API, tenant, or AI-derived attribute objects can receive a prototype-manipulated result. Consumers that enumerate inherited keys, including ProseMirror's DOM serializer, can turn the hidden properties into DOM attributes and execute JavaScript in the application's origin. Own-key validation, object spread, JSON serialization, and logging can miss the inherited values. Other component consumers can read inherited authorization or configuration fields.
Tiptap's standard fixed ProseMirror schemas discard unknown document attributes, so arbitrary Tiptap JSON is not automatically exploitable in every application. A vulnerable application needs an untrusted object boundary into
mergeAttributes()or a dynamic/custom extension or schema that preserves the relevant attribute object.Affected versions
The unsafe assignment was introduced in commit
ecadf7ea0a7f8f39a8496a60edf0ac8f379e6eb3and is present in the first package tag@tiptap/core@2.0.0-alpha.0, v2.0.0, v2.27.1, v3.0.0, and current v3.29.2 source. No fixed release was found.Recommended remediation
Reject
__proto__before reading or assigning the key, or define copied keys as own data properties without invoking legacy setters. A minimal hardening is to skipkey === '__proto__'. Add regression tests using an own JSON-origin__proto__key and assert that the result keepsObject.prototypeas its prototype, exposes no inherited attacker keys, and cannot create an event-handler attribute throughDOMSerializer.This was found during authorized dependency review and is being reported privately. No public zero-day issue has been opened.
Severity
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:H/SI:H/SA:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
ueberdosis/tiptap (@tiptap/core)
v3.30.4Compare Source
@tiptap/core
Patch Changes
mergeAttributes.v3.30.3Compare Source
Patch Changes
965a880: Fix JSX runtime to properly render nested sibling elements by spreading children arrays into DOMOutputSpecv3.30.2Compare Source
Patch Changes
3dffed5: Keep mixed JSX children as separate siblings in DOM output.214a140: Fixed a bug whereeditor.chainandeditor.cancan not be accessed on editor initializationv3.30.1Compare Source
Patch Changes
abc8828: Added new ProseMirror helpers that check whether a value is a specific ProseMirror type.v3.30.0Compare Source
Minor Changes
0247d39:ListKeymapnow registers aTabshortcut that sinks a top-level textblock into the previous list's last item. Pressing Tab at the start of a paragraph right after a bullet/ordered/task list moves the paragraph inside the last list item. The handler does nothing when the cursor is already inside a list item (sinkListItemkeeps working), when there is no list before the paragraph, when the caret is mid-textblock, or when the selection is not a text selection (for example a gap cursor).@tiptap/corealso exposes a newgetPreviousBlockSibling($pos)helper that returns the block-level sibling before the cursor's textblock, or null at the first child of the block parent.3099eef: New Decorations APIFinally the decorations API is here! Even though Decorations itself are nothing new in ProseMirror, the new API makes it much easier to use them in Tiptap without leaving your extensions.
Decorations change how the document looks without changing the document itself. Highlighting search results, marking spelling mistakes, showing collaborator cursors, putting a drag handle next to every block.
Until now you had to write a ProseMirror plugin by hand for this, keep the decoration set in plugin state, and map it forward on every transaction. Extensions can now declare decorations directly with a new
addDecorations()hook.There are three kinds.
Decoration.Inline()styles a range of text.Decoration.Node()puts attributes on a block's DOM element.Decoration.Widget()renders your own element at a single position.Every extension that declares decorations is collected into one plugin, so several extensions can decorate the same document without fighting over it.
Doing less work on every keystroke
By default decorations are rebuilt whenever the document changes. That is fine for small documents and wasteful for large ones, so there are two ways to narrow it down.
shouldUpdate()skips transactions you do not care about. If your decorations only depend on headings, ignore everything else.update: 'changedRanges'together withcreateInRange()only rescans the blocks that actually changed. On a long document this is the difference between scanning the whole thing on every keystroke and scanning one paragraph.For decorations driven by data outside the editor, like comments loaded from a server, use
update: 'manual'and refresh them yourself witheditor.commands.updateDecorations().React and Vue components as widgets
ReactWidgetRendererandVueWidgetRendererrender a real component into a widget decoration, inside your existing app context. Providers, context and stores work as usual.Widgets take a
key. Reuse the same key and the component instance stays mounted while the document changes around it, so local state such as an open menu, a counter or a half-typed input survives editing. Use a stable id from your own data, not a position or a list index, otherwise the component remounts and loses that state.Widgets also accept the ProseMirror options
side,relaxedSide,stopEventandignoreSelection.Documentation
Patch Changes
51909d3: FixedinsertContent,insertContentAtandsetContentfailing when prosemirror-model is loaded more than once.58a8953]v3.29.2Compare Source
Patch Changes
v3.29.1Compare Source
Patch Changes
v3.29.0Compare Source
Patch Changes
d26840f: Fix a TypeScript build error inisAndroid()where comparingnavigator.platformagainst the literal'Android'with===could fail to compile under somelib.dom.d.tstypings ("types have no overlap"). Switched to the same.includes()pattern already used byisiOS(), which is not affected by this TypeScript narrowing issue. No runtime behavior change.935e63f: Fixed a bug where deleting anAllSelection(for example right after Ctrl/Cmd+A) left a lingering "phantom" selection highlight over the emptied document instead of a text cursor.deleteSelectionnow collapses the selection to a cursor.b4c5a2d: Fix input rules crashing when the matched text spans an inline atom node like a mention.a963d48: Node viewgetPos()now returnsundefinedinstead of throwing when the position cannot be resolved yet, for example when React 19 renders a node view component while the editor view is still updating.51f45b6: FixedonContentErrorthrowing when callingeditor.commandsfrom inside the handler on initial load with invalid content. The editor now has a usable state (seeded from the stripped fallback document) beforeonContentErrorfires.0f63969: Fixeditor.$pos()returning the wrong node inside container nodes, for example the list item instead of the list.9acaa65: AddinsertDefaultBlockto insert the default textblock allowed at a position. It accepts an optional position, attributes, content, and selection-update option.e150ee0]v3.28.0Compare Source
Patch Changes
v3.27.4Compare Source
Patch Changes
v3.27.3Compare Source
Patch Changes
023f98c: FixdeleteSelectionto delete content across all selection ranges instead of only the first range. This restores multi-cell table selections and other custom selections with multiple ranges.v3.27.2Compare Source
Patch Changes
ceebb31]v3.27.1Compare Source
Patch Changes
v3.27.0Compare Source
Patch Changes
0d0094d: Ordered lists now support thetypeattribute (a,A,i,I).The
<ol>typeattribute is now fully preserved through the HTML round-trip:type="a"→ lowercase alphabetical markerstype="A"→ uppercase alphabetical markerstype="i"→ lowercase roman numeral markerstype="I"→ uppercase roman numeral markersPaste from external editors (Google Docs, Word, LibreOffice) now correctly detects the list style — both from the HTML
typeattribute and from CSSlist-style-typeproperties.Plain text paste of typed ordered list markers (e.g.
a. Item,I) Item,i. Item\nii. Item) is detected and converted to the correct list type.Markdown round-trip preserves typed markers: parsing
a. Itemcreatestype: "a", and serializing a typed list back to markdown uses the correct prefix (e.g.I.,ii.).Joining of adjacent lists now respects
type— two lists with different types (e.g. default numeric andtype="a") are not merged.795033c:parseAttributesnow supports any word characters at the start of classes or id attributes.0e0c4f9: FixmarksEqualto compare mark arrays as multisets instead of index-by-index, so order of marks no longer affects the result. Broaden the type signature to accept ProseMirrorMarkobjects (wheretypeis an object with anameproperty) alongside the existing JSON mark shape ({ type: string }).6d12bb9: Fix a edge-case inrewriteUnknownContentto not fail on null-ish values inside marks or nodes.v3.26.1Compare Source
Patch Changes
v3.26.0Compare Source
Patch Changes
v3.25.0Compare Source
Patch Changes
ec291dd: Fix: dragging an inline/resizable image within the editor no longer creates a duplicateWhen the
Imageextension was configured withinline: trueorresizeenabled, dragging an image within the editor could insert a duplicate at the drop position instead of moving it. This happened because the browser's native image drag behavior could populatedataTransfer.files, causing the FileHandler extension to intercept the drop before ProseMirror's internal move logic could run.454e9b8: Addclearablemark option (defaulttrue).unsetAllMarksnow skips marks withclearable: false, so semantic marks like comments are not removed by "clear formatting".9cf8db0: AddattrsEqualandmarksEqualutility functions to@tiptap/core.attrsEqualcompares two attribute objects for equality regardless of key ordering.marksEqualcompares two arrays of mark objects by type and attributes usingattrsEqual.3d4f94c: Fix plain-text copy of table cell selections including content from unselected cells in between. Each selected range is now serialized independently and joined in document order, so dragging upward (reverse selection) also produces output in document order.Updated dependencies [
c1a2ce8]Configuration
📅 Schedule: (in timezone America/Los_Angeles)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR was generated by Mend Renovate. View the repository job log.