CVE-2026-34748 Overview
A stored Cross-Site Scripting (XSS) vulnerability has been identified in Payload CMS, a popular free and open source headless content management system. Prior to version 3.78.0 in the @payloadcms/next package, an authenticated user with write access to a collection could save malicious content that would execute JavaScript in the browser of other users viewing that content in the admin panel.
Critical Impact
Authenticated attackers can inject persistent malicious scripts into the admin panel, potentially compromising other administrator accounts, stealing session tokens, or performing unauthorized actions on behalf of victims.
Affected Products
- Payload CMS @payloadcms/next versions prior to 3.78.0
- Applications using vulnerable versions of the Payload CMS admin panel
- Self-hosted and cloud deployments running unpatched Payload CMS instances
Discovery Timeline
- 2026-04-01 - CVE-2026-34748 published to NVD
- 2026-04-01 - Last updated in NVD database
Technical Details for CVE-2026-34748
Vulnerability Analysis
This vulnerability is classified as CWE-79 (Improper Neutralization of Input During Web Page Generation), commonly known as Cross-Site Scripting (XSS). The stored variant of XSS present in this vulnerability is particularly dangerous because the malicious payload persists in the application's database and executes every time a victim views the affected content.
The attack requires an authenticated user with write permissions to a collection within the Payload CMS system. Once an attacker saves malicious JavaScript content to a collection field, any subsequent user viewing that content through the admin panel will have the script execute in their browser context. This enables attackers to hijack sessions, steal credentials, perform actions as the victim, or further compromise the application.
Root Cause
The root cause of this vulnerability lies in insufficient input sanitization and output encoding within the Payload CMS admin panel. User-supplied content stored in collection fields was not properly sanitized before being rendered in the admin interface, allowing HTML and JavaScript to be interpreted by the browser rather than displayed as plain text.
Attack Vector
The attack leverages network-based access and requires the attacker to have low-privilege authenticated access (write permissions to a collection). User interaction is required as a victim must view the malicious content for the payload to execute. The scope is changed, meaning successful exploitation can affect resources beyond the vulnerable component, such as other admin users' sessions and browser contexts.
An attacker would typically craft a malicious payload containing JavaScript code and save it to a collection field. When another administrator or user views this content in the admin panel, the browser interprets and executes the malicious script with full access to the user's session, cookies, and DOM.
The vulnerability mechanism involves injecting script tags or JavaScript event handlers into collection field data. For detailed technical information, refer to the GitHub Security Advisory.
Detection Methods for CVE-2026-34748
Indicators of Compromise
- Unusual JavaScript content or HTML tags stored in collection fields that should contain plain text
- Unexpected script execution or browser behavior when viewing content in the admin panel
- Session anomalies such as unauthorized actions performed by administrator accounts
- Reports from users about unexpected redirects or pop-ups within the admin interface
Detection Strategies
- Review database content for suspicious HTML tags and JavaScript code in collection fields
- Implement Content Security Policy (CSP) headers to detect and block inline script execution
- Monitor admin panel access logs for unusual patterns following content views
- Deploy browser-based XSS detection tools that alert on unexpected script execution
Monitoring Recommendations
- Enable audit logging for all content creation and modification within Payload CMS collections
- Set up alerts for Content Security Policy violations in the admin panel
- Monitor for unusual session activity following admin panel content views
- Implement real-time scanning of user-submitted content for XSS payloads
How to Mitigate CVE-2026-34748
Immediate Actions Required
- Upgrade @payloadcms/next to version 3.78.0 or later immediately
- Review recently modified collection content for suspicious JavaScript or HTML payloads
- Invalidate and rotate session tokens for all admin users as a precaution
- Implement Content Security Policy headers to provide defense-in-depth
Patch Information
The Payload CMS team has addressed this vulnerability in version 3.78.0. Users should update their @payloadcms/next dependency to this version or later. The fix implements proper input sanitization and output encoding to prevent stored XSS attacks in the admin panel. For complete details on the security fix, see the GitHub Security Advisory.
Workarounds
- Restrict write access to collections to only trusted users until the patch can be applied
- Implement a Web Application Firewall (WAF) with XSS filtering rules as a temporary measure
- Deploy Content Security Policy headers to block inline script execution
- Conduct a security review of existing collection content to identify and remove any malicious payloads
# Update @payloadcms/next to patched version
npm update @payloadcms/next@3.78.0
# Or update via yarn
yarn upgrade @payloadcms/next@3.78.0
# Verify installed version
npm list @payloadcms/next
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

