@tiptap/core · Tiptap: mergeAttributes() turns an own __proto__ key into inherited executable DOM attributes
Affects @tiptap/coreSource GCVE Database
CVSS 6.4 Medium : upgrade to 3.30.4 when convenient.
Data as of 1 Dec 2026, 15:34 UTC
- Patch
- Available – fixed in 3.30.4, 2.27.3
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:H/SI:H/SA:NWhat to do
Upgrade @tiptap/core to 3.30.4; @tiptap/core to 2.27.3.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| npm@tiptap/core | Affected
| Fixed in
|
| npm@tiptap/core | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
A fix is available in @tiptap/core versions 2.27.3 and 3.30.4. Users should upgrade to these or later versions to remediate the vulnerability. The root cause is unsafe assignment of __proto__ keys; the fix rejects or safely handles such keys to prevent prototype pollution. Applications should ensure that untrusted input is sanitized to exclude __proto__ keys before merging attributes. Regression tests should verify that the merged attribute object retains Object.prototype as its prototype and does not expose inherited attacker-controlled keys. No other immediate mitigation is required once patched.
Description
A prototype pollution vulnerability exists in @tiptap/core's mergeAttributes() function, where an attacker-controlled __proto__ key in JSON input can manipulate the prototype of the merged attribute object. This causes inherited properties to be enumerated and applied as DOM attributes by ProseMirror's DOMSerializer, enabling execution of attacker-controlled JavaScript in the browser context. The issue affects versions from 2.0.0-alpha.0 up to but not including 2.27.3 and from 3.0.0-next.0 up to but not including 3.30.4. Fixed versions 2.27.3 and 3.30.4 are available. Exploitation requires untrusted input reaching mergeAttributes() and usage of the vulnerable attribute object in DOM serialization.
References
- github.com/ueberdosis/tiptap/security/advisories/GHSA-cp6q-959q-f8rh (opens in a new tab)
- github.com/ueberdosis/tiptap/pull/8309 (opens in a new tab)
- github.com/ueberdosis/tiptap/commit/01d7af8c983ee5954c63734f4fa46cb23ae3246d (opens in a new tab)
- github.com/ueberdosis/tiptap/commit/fa6abcce65e58c60d40c7cdf59950d4f03ce83a4 (opens in a new tab)
- github.com/ueberdosis/tiptap (opens in a new tab)
- github.com/ueberdosis/tiptap/releases/tag/v3.30.4 (opens in a new tab)