Stored XSS in @payloadcms/richtext-lexical
Description
Impact
Stored cross-site scripting (XSS) in @payloadcms/richtext-lexical allows an authenticated content author to execute JavaScript in another user’s session when they view a document’s version comparison in the Admin Panel. This can lead to privilege escalation.
You are affected if:
- You use
@payloadcms/richtext-lexicalwith document versioning. - Users can save rich text content that other users review through the Admin Panel’s version comparison view.
Patches
The fix prevents crafted rich text table data from injecting executable HTML into the version comparison view.
Users should upgrade to >=3.93.0 or >=4.0.0-beta.7.
Workarounds
Upgrading is recommended. Until then, avoid opening version comparisons for documents containing untrusted rich text content.