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-70593

CVE-2026-70593: Path Traversal and Arbitrary File Write via Custom Theme Upload in Ghost CMS

Alon Barad
Alon Barad
Software Engineer

Aug 5, 2026·5 min read·58 visits

Executive Summary (TL;DR)

A path traversal flaw in Ghost CMS theme extraction allows authenticated users with administrative privileges to write arbitrary files to the local file system using crafted ZIP archives.

CVE-2026-70593 is a path traversal and arbitrary file write vulnerability affecting Ghost CMS. Versions from 0.10.0 up to 6.54.0 are vulnerable. Authenticated administrators can exploit this flaw by uploading a custom theme in a ZIP archive that contains path traversal characters. The vulnerability is mitigated in version 6.54.1.

Vulnerability Overview and Architectural Context

Ghost CMS implements a customizable theme architecture where users with high privileges can package presentation layouts as ZIP archives and upload them to the backend server. The uploaded archives are parsed, validated, and subsequently written to a designated local directory on the server's filesystem.

In vulnerable versions of Ghost, the application framework relies on the LocalStorageBase class to coordinate file system output. This class failed to verify that canonical absolute paths of written files resolved strictly inside the target storage directory. This omission allowed file writes to escape boundaries when handling nested archive paths containing relative directory traversal characters.

The vulnerability is categorized under CWE-22 (Improper Limitation of a Pathname to a Restricted Directory). By utilizing path traversal vectors, authenticated actors with theme upload permissions can execute arbitrary write operations, which can compromise system configuration files and lead to remote code execution under specific server environments.

Root Cause Analysis

The root cause of CVE-2026-70593 stems from two major flaws in the file persistence and validation routines. The primary flaw resides within the local storage adapter class, LocalStorageBase, which is used during theme extraction. The adapter calculates destination file paths using getUniqueFileName(file, targetDir), but it does not perform structural boundary verification on the resolved target paths.

Because the system did not canonicalize and check target file paths against the base destination folder, any path traversal sequence such as ../ within the ZIP file's headers would resolve outside the sandbox of the active theme folder. The file extraction engine would then write files to directories beyond the content/themes/ or content/images/ path roots.

The secondary flaw lies within the validation of theme naming parameters in the theme manager service (storage.js). The server did not reject directory names composed entirely of dots and slashes, such as . or ../. This flaw allows an attacker to exploit directory resolution mechanisms directly through administrative theme-naming interfaces.

Source Code and Patch Analysis

The patch implemented in version 6.54.1 resolves both logical flaws by introducing strict directory-containment verification in LocalStorageBase.ts and directory name regex filtering in storage.js.

The following code diff illustrates the primary containment fix implemented in LocalStorageBase.ts:

// ghost/core/core/server/adapters/storage/LocalStorageBase.ts
class LocalStorageBase extends StorageBase {
    async save(file, targetDir) {
        const filename = await this.getUniqueFileName(file, targetDir);
        targetFilename = filename;
 
        // PATCHED: Canonicalize targetDir and append trailing slash to prevent partial-name bypasses
        const expectedPrefix = path.join(path.resolve(targetDir), '/');
        
        // PATCHED: Resolve absolute filename path and assert structural containment
        if (!path.resolve(targetFilename).startsWith(expectedPrefix)) {
            throw new errors.BadRequestError({
                message: 'Cannot save to the given filename'
            });
        }
 
        await fs.mkdirs(targetDir);
        // Extraction writes continue
    }
}

The second part of the patch addresses theme naming by filtering inputs against a regular expression:

// ghost/core/core/server/services/themes/storage.js
const INVALID_THEME_REGEX = /^[./]*$/;
 
// Reject theme names consisting strictly of path navigation characters
if (INVALID_THEME_REGEX.test(themeName)) {
    throw new errors.ValidationError({
        message: 'Invalid theme name.'
    });
}

The use of path.resolve combined with a trailing slash is a robust path validation technique. It guarantees that any resolved target path begins exactly with the canonical structure of the expected output directory, effectively stopping Zip Slip traversal tricks.

Exploitation and Attack Path Analysis

Exploitation of CVE-2026-70593 requires the attacker to hold administrative permissions, which limits the attack surface to authenticated users. This is classified as a 'Zip Slip' file manipulation attack.

An attacker begins by archiving a malicious file (e.g., a replacement configuration file or a payload shell) into a custom ZIP directory structure. The filename in the ZIP header is manually altered to include relative traversal paths, such as ../../../../var/www/ghost/config.production.json.

The attacker then uploads the custom theme ZIP using the administrative interface's theme section. The platform's zip parser extracts each archive entry. Because previous versions of LocalStorageBase did not validate containment, the program writes the file to the relative traversed directory, overwriting arbitrary targets within the write-permissions scope of the application process.

Impact Assessment

The severity of CVE-2026-70593 is rated as Medium (CVSS 6.6) primarily because high-privilege credentials are required to execute the exploit. However, the integrity impact is high (I:H) due to the arbitrary file write capability.

By overwriting templates or configuration files like config.production.json, an attacker can disable services, redirect logs, or modify runtime environment variables. This can lead to a denial of service (A:L) or execution-flow hijacking.

If the application is executed as a root or highly-privileged user, the attacker can overwrite sensitive system files or plant scheduled scripts (e.g., cron jobs) on the host filesystem. This leads to arbitrary code execution in the context of the underlying system, resulting in a full system compromise.

Remediation and Mitigation Guidance

The recommended remediation is upgrading the local Ghost installation to version 6.54.1 or higher. This release contains the necessary canonical directory checks to block path traversal sequences.

In environments where an immediate update is not possible, system administrators must limit administrative and staff roles to trusted personnel only. Auditing the active user accounts ensures that rogue roles do not maintain custom theme upload privileges.

Deploying the Ghost CMS server under a dedicated, low-privilege system account is a crucial defense-in-depth practice. Denying write access to critical OS folders such as /etc/ or application root files outside of content/ prevents successful path-traversal attacks from overwriting essential system resources.

Fix Analysis (1)

Technical Appendix

CVSS Score
6.6/ 10
CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:N/I:H/A:L

Affected Systems

Ghost CMS (Self-hosted instances)

Affected Versions Detail

Product
Affected Versions
Fixed Version
Ghost
TryGhost
>= 0.10.0, < 6.54.16.54.1
AttributeDetail
CWE IDCWE-22
Attack VectorNetwork
CVSS Score6.6 (Medium)
EPSS ScoreN/A
Exploit StatusPoC available, no active in-the-wild exploitation observed
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1083File and Directory Discovery
Discovery
T1005Data from Local System
Collection
CWE-22
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

References & Sources

  • [1]GitHub Security Advisory GHSA-cjc9-q5gf-327p
  • [2]CVE-2026-70593 Record

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 1 hour ago•CVE-2026-114152
8.8

CVE-2026-114152: Stack-Based Buffer Overflow and Untrusted Pointer Dereference in Microsoft DiaSymReader.Native

CVE-2026-114152 is a high-severity remote code execution vulnerability affecting Microsoft Visual Studio 2026 and multiple servicing branches of the Microsoft .NET runtime (.NET 8.0, 9.0, 10.0, and 11.0) on Windows platforms. The vulnerability exists within the native symbol reader library, Microsoft.DiaSymReader.Native, specifically inside the DiaObjectFile::ApplyFixup method during the processing of Common Object File Format (COFF) relocation records. By supplying a malformed object file or Program Database (PDB) symbol file containing out-of-bounds relocation offsets or invalid symbol table indices, an unauthenticated attacker can trigger an untrusted pointer dereference (CWE-822) and a stack-based buffer overflow (CWE-121). Successful exploitation occurs when a victim opens, compiles, or debugs a malicious project or symbol artifact, leading to arbitrary code execution within the security context of the active developer environment or build process.

Amit Schendel
Amit Schendel
3 views•11 min read
•about 2 hours ago•CVE-2026-118745
8.8

CVE-2026-118745: Remote Code Execution via Heap-Based Buffer Overflow in Microsoft Visual Studio and .NET DiaSymReader

CVE-2026-118745 is a high-severity remote code execution vulnerability affecting Microsoft Visual Studio 2026 and multiple supported versions of the .NET runtime (8.0, 9.0, 10.0, and 11.0) on Windows systems. The flaw is a heap-based buffer overflow (CWE-122) located within the native symbol reading library, Microsoft.DiaSymReader.Native, specifically in the routines responsible for extracting and parsing Program Database (.pdb) line number metadata. An attacker can exploit this vulnerability by supplying a crafted .pdb file alongside a repository, project, or compiled binary. When a developer or automated diagnostic process parses the malformed debug symbols, an out-of-bounds heap write occurs, permitting arbitrary code execution within the security context of the active user process.

Amit Schendel
Amit Schendel
6 views•10 min read
•about 3 hours ago•CVE-2026-109481
7.5

CVE-2026-109481: Cross-Site Request Forgery Leading to Elevation of Privilege in ASP.NET Core

CVE-2026-109481 is a high-severity Cross-Site Request Forgery (CSRF) vulnerability in the ASP.NET Core Blazor Server and interactive component architecture. The flaw exists within the internal circuit state synchronization endpoint (`/_blazor/refresh`), which fails to enforce antiforgery token validation or verify cross-origin request headers. By inducing an authenticated victim to issue a cross-site request targeting a pre-allocated circuit identifier, an unauthenticated attacker can bind the victim's security principal to the attacker's active SignalR circuit, resulting in full privilege elevation within the application scope.

Amit Schendel
Amit Schendel
5 views•9 min read
•about 4 hours ago•CVE-2026-126187
9.5

CVE-2026-126187: Unauthenticated Remote Code Execution in React Server Components

A critical deserialization vulnerability exists in React Server Components (RSC) packages (`react-server-dom-webpack`, `react-server-dom-parcel`, and `react-server-dom-turbopack`) across versions 19.0.0 through 19.3.0. The flaw occurs during the processing of React Flight protocol streams when handling multiple typed arrays sharing a backing ArrayBuffer alongside attacker-controlled inputs. By combining byte-stream buffer detachment semantics with unvalidated thenable invocation and exposed internal response states, an unauthenticated attacker can achieve remote code execution on server runtimes supporting React Server Components.

Alon Barad
Alon Barad
18 views•11 min read
•about 5 hours ago•CVE-2026-125123
2.3

CVE-2026-125123: Improper Output Neutralization and CI Workflow Command Injection in compose-lint CLI Parser

An improper output neutralization vulnerability (CWE-117 / CWE-150) exists in compose-lint version 0.31.0. When compose-lint is invoked on untrusted file paths without a preceding '--' option delimiter, Python's standard argparse module rejects malformed or dash-prefixed paths and writes them directly to standard error without passing through the application's output sanitizer. An attacker submitting a pull request containing crafted directory or file names with carriage returns or Unicode whitespace can inject arbitrary CI workflow commands into GitHub Actions or Azure Pipelines job logs.

Alon Barad
Alon Barad
5 views•10 min read
•about 6 hours ago•CVE-2026-125116
4.8

CVE-2026-125116: Type Confusion in Mongoose Discriminator Resolution

CVE-2026-125116 (GHSA-wr5m-5jph-8m96) is a type confusion vulnerability (CWE-843) in Mongoose, the MongoDB object modeling library for Node.js. When resolving discriminator models or schemas via user-supplied discriminator keys (defaulting to `__t`), Mongoose performs direct property indexing on plain JavaScript registry objects without verifying own-property ownership. Supplying inherited `Object.prototype` property names such as `'constructor'` causes Mongoose to resolve built-in functions rather than valid Mongoose constructors, resulting in unhandled runtime exceptions, schema validation bypasses, and persistent collection query denial of service.

Alon Barad
Alon Barad
5 views•11 min read