Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-105868 Overview
CVE-2026-105868 affects Payload, an open source headless content management system. Local upload configurations that accept XML files allow an attacker to store an XML file and stylesheet that execute JavaScript in the Payload origin. The payload runs when a logged-in user opens the uploaded file in a browser. The flaw is tracked under CWE-434 (Unrestricted Upload of File with Dangerous Type) and is addressed in Payload versions 3.90.0 and 4.0.0-canary.34.
Critical Impact
Authenticated attackers can store malicious XML files that execute arbitrary JavaScript in the Payload admin origin, enabling session theft, account takeover, and administrative action abuse.
Affected Products
- Payload CMS versions prior to 3.90.0
- Payload CMS canary versions prior to 4.0.0-canary.34
- Deployments using local upload configurations that accept XML MIME types
Discovery Timeline
- 2026-10-06 - CVE-2026-105868 published to NVD
- 2026-10-06 - Last updated in NVD database
Technical Details for CVE-2026-105868
Vulnerability Analysis
Payload accepts user-supplied file uploads through configurable collections. When an upload collection permits XML content types, the server stores the file and later serves it with an XML content type. Browsers process XML documents that reference an XSLT stylesheet, and that stylesheet can embed and execute JavaScript. Because the file is served from the Payload admin origin, the JavaScript executes with full access to the authenticated user's session cookies, CSRF tokens, and admin API routes.
The flaw qualifies as stored Cross-Site Scripting (XSS) via unrestricted file upload. Exploitation requires an authenticated user with upload permissions to post the file, and a victim (typically another logged-in admin or editor) to open the asset URL.
Root Cause
The static handler did not validate the identity of XML content before delivery and did not apply a restrictive Content Security Policy to uploaded assets. The patch introduces an isXmlMimeType check and a dedicated UPLOAD_CONTENT_SECURITY_POLICY applied through the static handler to prevent inline script execution from uploaded documents.
Attack Vector
An attacker with upload rights crafts an XML file that references an XSLT stylesheet containing JavaScript. The attacker uploads the file through a vulnerable collection endpoint. When any logged-in Payload user opens the stored file URL, the browser processes the XSLT and executes the JavaScript against the Payload origin, allowing the attacker to issue authenticated requests on behalf of the victim.
// Security patch in packages/payload-cloud/src/staticHandler.ts
import type { CollectionConfig } from 'payload'
import type { Readable } from 'stream'
+import { isXmlMimeType, UPLOAD_CONTENT_SECURITY_POLICY } from 'payload/internal'
+
import type { CollectionCachingConfig, PluginOptions, StaticHandler } from './types.js'
import { createKey } from './utilities/createKey.js'
Source: GitHub Commit a8c3a8e
// Security patch in packages/payload/src/exports/internal.ts
+export {
+ assertClientUploadAllowed,
+ assertClientUploadFileSize,
+} from '../uploads/assertClientUploadAllowed.js'
export { getExternalFile } from '../uploads/getExternalFile.js'
+export { isSvgMimeType, isXmlMimeType } from '../uploads/getFileTypeIdentity.js'
export { getRangeRequestInfo } from '../uploads/getRangeRequestInfo.js'
export { getSafeFileName } from '../uploads/getSafeFilename.js'
export { parseRangeHeader } from '../uploads/parseRangeHeader.js'
+export { UPLOAD_CONTENT_SECURITY_POLICY } from '../uploads/uploadContentSecurityPolicy.js'
Source: GitHub Commit a8c3a8e
The patch adds MIME type identity checks (isXmlMimeType, isSvgMimeType), client upload assertions, and a content security policy for uploaded assets delivered through the static handler.
Detection Methods for CVE-2026-105868
Indicators of Compromise
- Uploaded files with .xml or .xsl extensions, or application/xml and text/xml content types, in upload-enabled Payload collections.
- XML documents containing an <?xml-stylesheet?> processing instruction referencing an attacker-controlled XSLT.
- XSLT files that include <script> elements, javascript: URIs, or references to external domains.
- Admin session activity originating shortly after an admin user requested an uploaded .xml asset URL.
Detection Strategies
- Inspect the upload storage directory for XML and XSLT files and review their contents for script tags or external references.
- Review Payload collection configurations for upload definitions that allow XML MIME types.
- Correlate HTTP access logs for GET requests to media URLs ending in .xml from authenticated admin sessions.
Monitoring Recommendations
- Log and alert on new file uploads whose detected MIME type is application/xml, text/xml, or application/xslt+xml.
- Monitor admin API audit logs for unexpected privilege changes, user creations, or configuration modifications following XML asset access.
- Alert on outbound requests from admin browsers to unknown domains while an admin asset URL is being viewed.
How to Mitigate CVE-2026-105868
Immediate Actions Required
- Upgrade Payload to version 3.90.0 or 4.0.0-canary.34 or later.
- Audit all upload-enabled collections and remove XML MIME types from mimeTypes allowlists where not required.
- Scan existing upload storage for XML and XSLT files and quarantine any uploads of unknown origin.
- Invalidate active admin sessions and rotate API keys if suspicious XML uploads are discovered.
Patch Information
The fix is included in Payload 3.90.0 and 4.0.0-canary.34. See the GitHub Security Advisory GHSA-9qpg-3cf8-w33x, the v3.90.0 Release Notes, and the upstream commit. The patch adds MIME identity validation and applies an upload-specific Content Security Policy through the static handler.
Workarounds
- Remove application/xml, text/xml, and application/xslt+xml from the mimeTypes array of affected upload collections until patching is possible.
- Serve uploaded media from a separate origin or subdomain that does not share cookies with the Payload admin interface.
- Place a reverse proxy in front of the uploads route that strips XML responses or forces a Content-Disposition: attachment header.
- Deploy a restrictive Content Security Policy at the edge that disallows inline scripts for upload paths.
# Example: restrict upload MIME types in a Payload collection config
# collections/Media.ts
export const Media = {
slug: 'media',
upload: {
staticDir: 'media',
mimeTypes: ['image/png', 'image/jpeg', 'image/webp', 'application/pdf'],
},
fields: [{ name: 'alt', type: 'text' }],
}
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

