MEDIUM 5.4

CVE-2026-53948: Ghost CMS Admin API File Upload Content-Type Validation Vulnerability

Ghost, a popular Node.js content management system, contains a vulnerability in its Admin API file upload feature that allows attackers to trick the system into serving uploaded files with incorrect content types. An authenticated attacker could upload a file and specify a malicious content type—for example, declaring an HTML file as a text file. When Ghost serves these files from the same origin as the website itself (a common configuration), visitors or staff members could be tricked into executing the attacker's code, compromising their browsers or sessions. This vulnerability affects Ghost versions 6.19.4 through 6.21.0 and is resolved in version 6.21.1.

Source data · NVD / CISA · public domain

CVSS
3.1 · 5.4 MEDIUM · CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
Weaknesses (CWE)
CWE-434
Affected products
0 configuration(s)
Published / Modified
2026-06-24 / 2026-06-25

NVD description (verbatim)

Ghost is a Node.js content management system. From 6.19.4 until 6.21.1, insufficient validation of the client-supplied Content-Type on Ghost's Admin API file upload endpoint allowed uploaded files to be served from the site with an attacker-chosen content type on S3/GCS storage backends. On installations that serve uploaded files from the same origin as the site, this could have been used to facilitate stored cross-site scripting against site visitors or staff. This vulnerability is fixed in 6.21.1.

1 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

The vulnerability stems from insufficient input validation on the Content-Type header submitted by clients during file uploads to Ghost's Admin API. The affected code path does not properly sanitize or enforce content-type restrictions on uploaded files when they are subsequently served. On deployments using S3 or GCS backends where the storage origin is identical to the application origin (same-origin serving), this permits an authenticated admin or user with upload privileges to upload content with a falsified MIME type. When the file is requested by another user, the server responds with the attacker-specified Content-Type header rather than the actual file type. If the attacker specifies 'text/html' or 'application/javascript', browsers will interpret and execute the content, leading to stored cross-site scripting (XSS). The vulnerability requires authentication (PR:L in the CVSS vector) and user interaction (UI:R), limiting its immediate blast radius but posing significant risk in multi-user Ghost instances.

Business impact

For Ghost blog owners and publishing platforms, this vulnerability creates a pathway for authenticated insiders or compromised editor accounts to inject malicious scripts that execute in the browsers of site visitors, administrators, and content teams. Potential consequences include session hijacking, credential theft, unauthorized content modification, and reputational damage if defaced or malware is served from the site. Organizations relying on Ghost for customer-facing content or internal collaboration tools should treat this as a priority remediation item. The risk is especially acute if your instance hosts sensitive content or attracts high-value targets. Multi-tenant Ghost deployments should assume that any user with upload permissions poses a latent threat.

Affected systems

Ghost versions 6.19.4 through 6.21.0 are vulnerable. The vulnerability manifests only when uploaded files are served from the same origin as the application (a common default configuration). Installations that serve uploads from a separate domain or CDN with strict CORS and content-type enforcement are at lower risk. The vulnerability does not affect Ghost versions before 6.19.4 or versions 6.21.1 and later.

Exploitability

Exploitation requires authentication to the Ghost Admin API—an attacker must possess valid credentials or compromise an editor/contributor account. The attack also depends on at least one other user viewing or interacting with the uploaded file, making it a stored XSS rather than immediate code execution. However, in active publishing environments, this bar is relatively low. The absence of this CVE from CISA's Known Exploited Vulnerabilities (KEV) catalog indicates no evidence of active in-the-wild exploitation at the time of publication, but the straightforward nature of the attack means defensive measures should not be delayed.

Remediation

Upgrade Ghost to version 6.21.1 or later immediately. This release includes proper validation and sanitization of the Content-Type header on upload. For organizations unable to patch immediately, consider temporarily disabling file uploads via the Admin API, restricting upload permissions to a minimal set of trusted users, or configuring your reverse proxy or CDO to enforce strict Content-Type headers on all responses from the upload storage endpoint. If files are served from a separate domain or CDN, confirm that CORS headers and content-disposition policies are properly configured to prevent script execution.

Patch guidance

1. Verify your current Ghost version (check in Admin → About or via the /ghost/api/admin/site endpoint). 2. If running 6.19.4–6.21.0, plan an upgrade to 6.21.1 or the latest available release in your major version line. 3. Consult the official Ghost release notes and upgrade guide at https://ghost.org for migration and downtime considerations. 4. Test uploads and file serving in a staging environment before deploying to production. 5. Monitor Ghost logs for any suspicious file uploads between the time you discovered the vulnerability and the time you patched.

Detection guidance

Review Admin API audit logs for file upload requests during the vulnerable window (if available in your Ghost instance). Look for uploads of files with mismatched extensions and declared content-types (e.g., .html files declared as text/plain, or .js files with image MIME types). Scan your storage backend (S3/GCS) for HTML or JavaScript files in your uploads folder, especially those created by users with lower privilege levels. Monitor web server logs for requests to uploaded files that return Content-Type headers inconsistent with the file extension. Consider running a content security policy (CSP) audit to see if uploaded content could bypass your current CSP rules.

Why prioritize this

Although this is a MEDIUM severity vulnerability (CVSS 5.4), it should be prioritized for prompt remediation because: (1) it enables stored XSS against site visitors and staff, a high-impact attack vector; (2) it requires only authentication (easily obtained via compromised or insider accounts); (3) Ghost instances are frequently used on customer-facing and high-traffic sites; (4) the fix is simple and available; and (5) the window of exploitation extends from version 6.19.4 onward, meaning any unpatched instance in that range is at risk.

Risk score, explained

The CVSS 3.1 score of 5.4 (MEDIUM) reflects a network-accessible vulnerability with low attack complexity but requiring authentication and user interaction. The scope change (S:C) indicates the attack can impact resources beyond the vulnerable component (other users' sessions). However, the lack of direct confidentiality impact on the system itself and the requirement for both authentication and UI interaction limit the score. In practice, the business risk to a multi-user Ghost platform may exceed the numerical score because stored XSS can lead to account compromise or data exfiltration affecting multiple users.

Frequently asked questions

Does this vulnerability affect Ghost instances that serve uploads from a separate CDN or different domain?

The vulnerability is significantly mitigated on deployments where uploads are served from a different origin (e.g., cdn.example.com instead of example.com). Cross-origin restrictions prevent browser interpretation of scripts served from a different domain. However, we still recommend upgrading, as misconfigured CORS policies or unexpected origin sharing could re-expose the risk.

What privilege level is required to exploit this?

An attacker must have valid authentication credentials and permission to upload files via the Admin API. This typically requires an editor, contributor, or admin account. Compromised credentials or a malicious insider can exploit the vulnerability; public-facing upload forms would not be vulnerable unless explicitly exposed through the Admin API.

Is there a workaround if I cannot upgrade immediately?

Temporary mitigations include: restricting upload permissions to a small, trusted group; disabling the Admin API file upload endpoint if not in use; configuring your web server or WAF to strip or validate Content-Type headers on upload responses; or moving uploads to a separate domain. However, these are temporary measures and upgrading to 6.21.1 is the only permanent fix.

How can I tell if my Ghost instance was exploited?

Review Admin API logs and storage backend (S3/GCS) object metadata for suspicious uploads, particularly HTML or JavaScript files with mismatched MIME types or created by untrusted users. Check web server access logs for requests to uploaded files that returned unexpected Content-Type headers. Monitor for unauthorized changes to site content, unexpected JavaScript in the DOM, or reports from staff or visitors of unusual behavior on your site. A full content audit of your uploads folder is recommended.

This analysis is provided for informational purposes to assist security teams in understanding and remediating CVE-2026-53948. Verification of patch versions, affected product configurations, and deployment-specific risk should be conducted against the official Ghost release notes and your internal environment. SEC.co makes no warranty regarding the completeness or accuracy of this assessment. Always test patches in a staging environment before production deployment. Consult Ghost's official advisory and your security team before taking remediation action. Source: NVD (public-domain), retrieved 2026-08-02. Analysis generated by SEC.co (claude-haiku-4-5).