Skip to main content
VulnerabilityPublished Updated

@tiptap/core · Tiptap: mergeAttributes() turns an own __proto__ key into inherited executable DOM attributes

Affects @tiptap/coreSource GCVE Database

0

CVSS 6.4 Medium : upgrade to 3.30.4 when convenient.

Data as of 1 Dec 2026, 15:34 UTC

CVSS 4.0 base score
6.4Medium
How severe the flaw is on the 0–10 CVSS scale.
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:N

What to do

Upgrade @tiptap/core to 3.30.4; @tiptap/core to 2.27.3.

Affected software

ProductAffectedFixed in
npm@tiptap/coreAffected
  • >=3.0.0-next.0 <3.30.4
Fixed in
  • 3.30.4
npm@tiptap/coreAffected
  • >=2.0.0-alpha.0 <2.27.3
Fixed in
  • 2.27.3

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

Community reviews

Loading reviews…