/

CVE-2026-32728

Severity:

HIGH RISK

(7.6)

Stored Cross-Site Scripting (XSS) in Parse Server

CVE-2026-32728

Analyzed

Vulnerability type

Category:

Stored Cross-Site Scripting (XSS)

CWE:

CWE-79

Impact:

Stored Cross-Site Scripting leading to session and data compromise

Severity:

HIGH RISK

(7.6)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Parse Server's file upload handling allows attackers to bypass the file extension blocklist by appending MIME parameters (such as ;charset=utf-8) to the Content-Type header.

Combined with missing coverage for certain XML-based file types, this can enable stored XSS, where active content is uploaded, stored, and later executed in users' browsers under the application's domain.

Affected context

This vulnerability affects Parse Server deployments that:

  • Allow authenticated or unauthenticated users to upload files through the API or web interface, and
  • Rely on the default file extension blocklist instead of a strict allowlist, and
  • Serve uploaded files back under the same domain or origin as the main application, allowing the browser to treat them as trusted content.

Under these conditions, a crafted upload request with a manipulated Content-Type header and a script-capable file extension can be stored and later rendered by a victim's browser.

Exploit preconditions

  • Attack surface: File upload endpoints exposed by Parse Server (REST API, SDKs, or wrapped web UI).
  • Required access: Ability to upload files; this may require authentication depending on how the application is configured.
  • Trigger point: A victim later accesses or is embedded content from the stored uploaded file (e.g., via a link, image tag, iframe, or other resource reference).
  • Why exploitation is possible:
  • The server previously applied file extension validation using the Content-Type header including its MIME parameters, allowing bypass via values like text/xml;charset=utf-8.
  • Some XML-based extensions capable of rendering scripts in browsers were absent from the default blocklist.
  • Uploaded files are served from the application's domain, so any embedded script executes in that origin, turning the upload channel into a stored XSS vector.

Why this happens

The core issue is an insufficient defense-in-depth design for file upload validation in the context of script-capable content, mapping to CWE-79: Improper Neutralization of Input During Web Page Generation (Cross-Site Scripting).

At a technical level:

  • Extension-based filtering logic relied on the Content-Type header without first stripping MIME parameters, so the extension validation did not correctly match against the blocklist when parameters like ;charset=utf-8 were appended.
  • The default configuration used a denylist (blocklist) model and omitted several XML-based extensions that can be interpreted by browsers in a way that executes active content.

This combination meant that untrusted user-provided files, including those that can contain executable scripts, were treated as benign and stored, then later served from a trusted origin. When a victim's browser renders such a file, any embedded script runs with the application's privileges, turning a content upload feature into a stored XSS sink.

Potential impact

  • Theft of session tokens or authentication cookies accessible to scripts running under the application's domain.
  • Compromise of user credentials through phishing-style overlays, fake login prompts, or keylogging scripts injected via uploaded content.
  • Unauthorized access to or exfiltration of sensitive data stored in browser-accessible storage (e.g., localStorage, sessionStorage, IndexedDB).
  • Execution of arbitrary JavaScript in victims' browsers, enabling account takeover, UI redressing, or unauthorized actions performed on behalf of users.
  • Use of the compromised origin as a pivot for further client-side attacks (e.g., abusing trusted scripts to target other users or integrated web apps).

General mitigation guidance

Effective mitigation focuses on treating file uploads as untrusted content and constraining what types of files are ever accepted and how they are served:

  • Prefer a file extension allowlist, not a denylist:
  • Configure the upload subsystem so only a minimal set of required extensions is accepted (e.g., specific image or document formats).
  • Avoid relying on a default blocklist for security; treat it only as a convenience baseline.
  • Normalize and strictly validate metadata:
  • Strip MIME parameters (such as ;charset=utf-8) before evaluating or comparing Content-Type header values and extensions.
  • Do not trust client-supplied Content-Type or file extensions; verify them against server-side rules and, where feasible, content-type sniffing libraries.
  • Serve uploads as untrusted content:
  • Serve uploaded files from a separate domain or subdomain without privileged cookies (static or media domain pattern), reducing the impact if a script is rendered.
  • Ensure appropriate Content-Type, Content-Disposition, and X-Content-Type-Options: nosniff headers are set when serving uploads.
  • Consider using Content-Security-Policy (CSP) to limit where scripts can be loaded from and reduce the damage if uploaded content is rendered.
  • Minimize access and privileges:
  • Restrict who can upload files and where these files can be referenced from within the application's UI.
  • Apply rate limiting and monitoring on file upload endpoints to reduce abuse potential.

How teams detect issues like this

Detection can combine code-level checks with behavioral monitoring:

  • Static and configuration analysis:
  • Scan the codebase for upload-related logic that:
  • Uses file extension blocklists rather than explicit allowlists.
  • Directly trusts Content-Type headers or file extensions without normalization.
  • Flag configuration where fileUpload.fileExtensions is unset or configured as a broad denylist instead of a tightly scoped allowlist.
  • Code review signals:
  • File upload controllers that pass user-uploaded files directly to a storage backend and later serve them from the main application domain.
  • Routes or templates that embed or link to user-uploaded files without sanitizing file types or isolating them with separate origins and proper headers.
  • Lack of a central validation routine for uploaded file types, with ad-hoc checks scattered across handlers.
  • Runtime and log-based monitoring:
  • Monitor access logs for unusual patterns such as uploaded files requested with XML or other script-capable MIME types.
  • Use WAF or reverse proxy rules to detect and optionally block responses serving user-uploaded content with active Content-Type values to browsers.
  • Automated tooling:
  • Incorporate SAST tools that understand Node.js/Express-like patterns and can flag risky file upload implementation constructs.
  • Use DAST scanners to probe file upload endpoints for stored XSS behavior, including attempts to upload script-capable files and validate how they are later served.

Sources

SourceLink
github.comgithub.com/parse-community/parse-server/commit/4f53ab3cad5502a51a509d53f999e00ff7217b8d
github.comgithub.com/parse-community/parse-server/commit/c7599c577a02b97eb5e76d4e20517b0283ae73c8
github.comgithub.com/parse-community/parse-server/pull/10191
github.comgithub.com/parse-community/parse-server/pull/10192
github.comgithub.com/parse-community/parse-server/security/advisories/GHSA-42ph-pf9q-cr72

Frequently asked

questions

Exploitability depends on how the Parse Server-based application exposes file uploads. If untrusted users can upload files and those files are later served from the same origin as the main application, the vulnerability can often be used to mount stored XSS attacks against other users who view or load that content.

Not necessarily. If the application allows anonymous uploads, an attacker can exploit the issue without authentication. If uploads require authentication (for example, only logged-in users or specific roles can upload files), exploitation is limited to those who can reach the upload functionality.

The most robust pattern is to use a strict file extension allowlist tailored to your application's needs, normalize and validate Content-Type and extension values server-side, and serve uploaded content from a segregated, low-privilege origin with correct security headers. This avoids dependence on incomplete blocklists and reduces the impact even if a script-capable file slips through.

Design upload features with the assumption that any file may contain active content. Enforce extension allowlists, normalize and distrust client-supplied metadata, isolate user-generated content on separate domains, and establish security review checklists for any new upload-related feature. Complement this with regular security testing (SAST/DAST) and configuration reviews to catch regressions early.

Find out what's already
exploitable in your codebase.