Skip to content

← Actionable
Medium, CVSS 6.4

Tiptap: mergeAttributes() turns an own __proto__ key into inherited executable DOM attributes

GHSA-cp6q-959q-f8rh

What to do

Vendor fix available. Upgrade each affected package to the fixed version on its release line (@tiptap/core 3.30.4), redeploy, then verify what is actually installed.

This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.

Affected packages

  • npm @tiptap/core

    Affected
    >= 2.0.0-alpha.0, < 3.30.4
    Fixed in
    3.30.4

Sources

Severity and exploitation
Exploitation
No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
CVSS 4.0
6.4 · 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 · score source
EPSS
No dated EPSS signal available.
Source description

As published by the source; long descriptions are shortened.

Summary @tiptap/core's public mergeAttributes() helper uses ordinary bracket assignment on keys returned by Object.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, while Object.keys() and ordinary own-property checks show no attacker attributes. When that result is used as a ProseMirror DOMOutputSpec attribute object, prosemirror-model's DOMSerializer.renderSpec() enumerates it with for...in and applies inherited values with setAttribute(). In a browser proof, inherited src and onerror values were copied to an <img and the error handler executed once. This is per-object prototype manipulation; the proof does not modify global Object.prototype. Root cause The affected loop is conceptually: Object.entries(JSON.parse('{"proto": {...}}')) includes proto. Reading mergedAttributes['proto'] resolves the inherited Object.prototype; assigning to the same key…

Dates and revisions
Published by the source
Last modified by the source
Source last checked
  1. Revision 1 · created ·

    Published from ghsa record GHSA-cp6q-959q-f8rh

Agent brief

Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.

# Patch Next advisory brief: GHSA-cp6q-959q-f8rh

Advisory: Tiptap: mergeAttributes() turns an own __proto__ key into inherited executable DOM attributes
IDs: GHSA-cp6q-959q-f8rh
Record: https://patchnext.com/advisories/ghsa-cp6q-959q-f8rh (revision 1, source checked 26 Oct 2026, 13:02 UTC)
Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected.
Severity: Medium (CVSS 6.4)
Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV.
Vendor response: Vendor fix available; fixed versions by package: @tiptap/core 3.30.4. A vendor fix does not mean a deployment is fixed.

## Affected components
- npm @tiptap/core: affected >= 2.0.0-alpha.0, < 3.30.4; fixed in 3.30.4

## Suggested inspection (read-only)
- `npm ls @tiptap/core --all`: lists every installed copy and version, including transitive ones. Run in the project root after `npm ci`.

## Supported action
Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on @tiptap/core.
- Repeat the inspection and confirm that only fixed versions remain installed.

## Rollback considerations
- Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward.

## Unresolved questions
- Which deployments run an affected version?
- Exploitation status can change. Check again before lowering the priority.
- Mark the work resolved only after the fixed version is verified in production.

## Sources
- Verified: https://github.com/advisories/GHSA-cp6q-959q-f8rh (GitHub-reviewed advisory GHSA-cp6q-959q-f8rh lists affected ranges: npm @tiptap/core >=2.0.0-alpha.0 <3.30.4)

Commands are suggestions: review each one before running it.

Loading voting…