Skip to main content
Vulnerability Database/CVE-2026-105123

CVE-2026-105123: W CMS Remote Code Execution Vulnerability

CVE-2026-105123 is a remote code execution flaw in W CMS that lets authenticated editors upload malicious PHP files and write outside intended directories. This post explains its impact, affected versions, and mitigation steps.

Published:

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-105123 Overview

CVE-2026-105123 is a remote code execution vulnerability in W (vincent-peugnet/wcms) through version 3.18.0. Authenticated editors can write arbitrary files by abusing an unvalidated path parameter in POST /api/v0/media/upload/[*:path]. Attackers can upload .php files that the web server executes, use encoded ../ sequences to escape the media directory, and delete arbitrary files via DELETE /api/v0/media/[*:path]. The flaw is classified as Unrestricted Upload of File with Dangerous Type [CWE-434] and allows full compromise of the application and underlying web server.

Critical Impact

Authenticated editor accounts can achieve remote code execution, write files anywhere the web server user has access, and delete arbitrary files on the host.

Affected Products

  • W (vincent-peugnet/wcms) versions through 3.18.0
  • Controllerapimedia.php media upload controller
  • Media.php path-handling logic

Discovery Timeline

  • 2026-10-04 - CVE-2026-105123 published to NVD
  • 2026-10-06 - Last updated in NVD database

Technical Details for CVE-2026-105123

Vulnerability Analysis

The vulnerability resides in the WCMS media API handlers. The POST /api/v0/media/upload/[*:path] endpoint accepts a user-controlled path segment and writes the uploaded file to disk without validating the destination or the file extension. The matching DELETE /api/v0/media/[*:path] endpoint reuses the same unvalidated path logic for file removal.

Because the server does not restrict uploads to safe extensions, an authenticated editor can place a .php file inside a directory served by the web server. The next HTTP request to that file triggers PHP execution under the web server account. Combined with the delete primitive, an attacker can tamper with site content, backdoor templates, or remove log files to hinder forensics.

Root Cause

The root cause is missing input validation on the path route parameter and missing allow-listing of upload file types in Controllerapimedia.php and Media.php. The handler trusts caller-supplied path data and resolves it against the filesystem without canonicalization or containment checks. See the GitHub Code Snippet Controller and GitHub Code Snippet Media for the vulnerable code paths.

Attack Vector

Exploitation requires network access to the WCMS instance and valid editor credentials. The attacker issues a POST request to the media upload endpoint with a path value containing URL-encoded directory traversal sequences, such as %2E%2E%2F, followed by a filename ending in .php. The payload body contains PHP code. Once written, the attacker requests the uploaded file through the web server to execute arbitrary code. The same primitive can be inverted through the DELETE endpoint to remove files outside the intended media directory. Technical write-up: VulnCheck RCE Advisory for WCMS.

// No verified proof-of-concept code is published. See the VulnCheck advisory
// and GitHub Issue #662 for the technical description of the vulnerable
// request flow against POST /api/v0/media/upload/[*:path].

Stop Remote Code Execution Before It Runs

Singularity™ Endpoint detects and blocks exploit attempts at machine speed, including zero-days and novel attack techniques.

Stop Exploit Attempts

Detection Methods for CVE-2026-105123

Indicators of Compromise

  • Requests to POST /api/v0/media/upload/ containing encoded traversal sequences such as %2E%2E%2F or raw ../ in the path segment.
  • Newly created .php, .phtml, or .phar files inside WCMS media directories or outside the expected media root.
  • DELETE /api/v0/media/ requests referencing files outside the configured media directory.
  • Web server processes spawning shells (sh, bash, cmd.exe) from PHP interpreter contexts after a media upload.

Detection Strategies

  • Inspect web server and application logs for upload paths whose resolved filesystem location falls outside the configured media directory.
  • Alert on uploads whose filename extension is not in an allow-list of image or document types.
  • Correlate editor-role authentication events with subsequent media upload and file access patterns to flag abuse of valid credentials.

Monitoring Recommendations

  • Monitor file integrity on the WCMS webroot and media directories to catch unauthorized .php file creation.
  • Capture full request bodies for /api/v0/media/upload/ and /api/v0/media/ endpoints for retrospective analysis.
  • Track outbound network connections from the web server process to identify post-exploitation command-and-control traffic.

How to Mitigate CVE-2026-105123

Immediate Actions Required

  • Restrict network access to WCMS administrative interfaces and the /api/v0/media/ routes to trusted IP ranges.
  • Rotate credentials for all editor-role accounts and audit recent account activity for unauthorized uploads.
  • Review the webroot for unexpected .php files, especially under media directories, and remove any that are not part of the application.

Patch Information

At the time of publication, the advisory covers WCMS through 3.18.0. Track the upstream project at the GitHub WCMS Repository and GitHub Issue #662 for a fixed release. Apply the vendor fix once it is published and redeploy from a known-clean source tree.

Workarounds

  • Configure the web server to deny execution of PHP within the WCMS media directory using handler or location rules.
  • Enforce an allow-list of safe file extensions at a reverse proxy or Web Application Firewall in front of WCMS.
  • Block requests to /api/v0/media/upload/ and /api/v0/media/ whose path parameter contains ../, ..\\, or encoded traversal sequences.
  • Reduce the number of editor-role accounts and require multi-factor authentication for all privileged users.
bash
# Example nginx snippet to block PHP execution inside the WCMS media directory
location ^~ /media/ {
    location ~ \.(php|phtml|phar)$ {
        deny all;
        return 403;
    }
}

# Example WAF rule concept to block traversal in the media API path
# Deny when request URI matches: /api/v0/media/(upload/)?.*(\.\./|%2e%2e%2f|%2E%2E%2F)

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

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.