CVE-2026-104847: ProseMirror: XSS vulnerability in prosemirror-view's paste handling
Impact
When a user pastes attacker-provided HTML into a ProseMirror editor component, this can cause attacker-controlled JavaScript code to run in the browser window containing the editor.
Patches
Version 1.42.3 adds validation that prevents this attack.
Workarounds
No known workarounds.
Other sources
ProseMirror's view component renders and manages the editable browser interface for ProseMirror documents. Prior to 1.42.3, prosemirror-view paste handling accepts attacker-provided HTML whose clipboard slice context contains attributes that are not passed through schema attribute validation. When a user pastes the crafted HTML into an editor, the unvalidated context attributes can construct content that executes attacker-controlled JavaScript in the browser window containing the editor. This issue is fixed in version 1.42.3.
— NVD
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
npm/prosemirror-viewto a version that resolves this vulnerability.Fixed in 1.42.3 - Upgrade
Upgrade
prosemirror-viewto a version that resolves this vulnerability.Fixed in 1.42.3
Event History
Frequently Asked Questions
Which deployments are affected?
Deployments using prosemirror-view versions earlier than 1.42.3 are affected. The issue is in the view component's paste handling.
What must an attacker do to trigger the vulnerability?
An attacker must provide crafted HTML with clipboard slice context attributes that bypass schema attribute validation. A user must then paste that HTML into a ProseMirror editor.
Is authentication required to exploit this issue?
No attacker privileges are required, but exploitation requires user interaction: the target user must paste the crafted HTML into the editor.
What is the impact after successful exploitation?
The crafted content can execute attacker-controlled JavaScript in the browser window that contains the editor. The stated CVSS impact includes high confidentiality and integrity impact.
What is the remediation?
Upgrade prosemirror-view to version 1.42.3, which fixes the paste-handling issue.