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-2025-0520

CVE-2025-0520: Unauthenticated Remote Code Execution via Unrestricted File Upload in ShowDoc

Amit Schendel
Amit Schendel
Senior Security Researcher

Apr 14, 2026·6 min read·84 visits

Executive Summary (TL;DR)

A typo in the file extension whitelist property ('allowExts' instead of 'exts') in ShowDoc's image upload endpoint permits unauthenticated attackers to upload PHP files, resulting in remote code execution.

ShowDoc versions prior to 2.8.7 are vulnerable to a critical unrestricted file upload vulnerability due to an incorrect property configuration in the ThinkPHP file upload class. This allows unauthenticated attackers to upload arbitrary PHP web shells and achieve remote code execution.

Vulnerability Overview

ShowDoc versions prior to 2.8.7 contain a critical unrestricted file upload vulnerability identified as CVE-2025-0520. The flaw exists in the image upload endpoint accessible via the URI path /index.php?s=/home/page/uploadImg. This endpoint fails to validate file extensions correctly before saving user-supplied files to the server filesystem.

The validation failure stems from a misconfiguration in the implementation of the underlying ThinkPHP framework. The framework defaults to a permissive state, allowing all file extensions when the validation property is incorrectly specified or omitted entirely. The developer's incorrect property assignment overrides the intended security controls.

Unauthenticated attackers exploit this vulnerability to upload arbitrary PHP scripts to the target server. The application stores these uploaded scripts in a publicly accessible directory without stripping execution privileges. Successful exploitation results in arbitrary remote code execution within the context of the web server process.

This vulnerability affects all default installations of ShowDoc prior to the patched version. The flaw exposes affected systems to complete compromise, allowing attackers to establish persistent access, manipulate internal databases, and pivot into adjacent network segments.

Root Cause Analysis

The vulnerability originates in the uploadImg method of the PageController class. The development team attempted to enforce a whitelist of safe image extensions for user uploads. To implement this restriction, the code instantiated the Think\Upload class from the ThinkPHP 3.x framework.

The developer assigned the array of permitted extensions (jpg, gif, png, jpeg) to a property named allowExts. The ThinkPHP 3.x framework expects the extension whitelist to be defined using the property exts. Because allowExts is an unrecognized property, the framework silently ignored the configuration assignment.

Consequently, the upload class operated with an empty extension restriction list. The framework logic permits all file types by default when no explicit restrictions are configured. This architectural behavior is designed to allow developers to build generic upload handlers, but it introduces severe risks when intended restrictions fail to apply.

The application logic relies entirely on the ThinkPHP class for file validation before moving the temporary upload to its final destination. Since the framework validation passes successfully for all extensions, the application proceeds to write the file, enabling the upload of executable PHP scripts directly to the web root.

Code Analysis

The vulnerable implementation resides in server/Application/Home/Controller/PageController.class.php. The instantiation of the upload handler explicitly demonstrates the property name error. The code defines a maximum file size and attempts to define the allowed extensions before invoking the upload() method.

public function uploadImg(){
    // ...
    $upload = new \Think\Upload();
    $upload->maxSize  = 3145728 ;
    $upload->allowExts  = array('jpg', 'gif', 'png', 'jpeg'); // INCORRECT PROPERTY
    $upload->rootPath = './Public/Uploads/';
    $upload->savePath = '';
    $info = $upload->upload();
    // ...
}

The framework documentation confirms exts is the correct property for array-based extension validation in ThinkPHP 3.x. The incorrect property assignment left the upload process entirely unrestricted. The patch resolves this by correcting the property name to exts.

--- a/server/Application/Home/Controller/PageController.class.php
+++ b/server/Application/Home/Controller/PageController.class.php
@@ -147,7 +147,7 @@ public function uploadImg(){
         }else{
             $upload = new \Think\Upload();
             $upload->maxSize  = 3145728 ;
-            $upload->allowExts  = array('jpg', 'gif', 'png', 'jpeg');
+            $upload->exts  = array('jpg', 'gif', 'png', 'jpeg');
             $upload->rootPath = './Public/Uploads/';
             $upload->savePath = '';
             $info = $upload->upload() ;

This simple syntactic correction restores the core validation mechanism. Attackers attempting to upload .php files after this patch will face a validation rejection from the framework before the file is written to disk. The upload method will return a failure state, preventing the malicious file creation.

Exploitation Methodology

Exploitation requires network access to the vulnerable ShowDoc instance. The attacker does not need prior authentication or specific privileges, making this a zero-click remote vector for unauthenticated users. The /index.php?s=/home/page/uploadImg endpoint handles the payload delivery.

The attack sequence begins with crafting a standard multipart/form-data POST request. The request targets the upload endpoint and includes a PHP web shell as the payload within the editormd-image-file parameter. The filename is explicitly set with a .php extension.

POST /index.php?s=/home/page/uploadImg HTTP/1.1
Host: <target-ip>:8080
Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryExploit
Connection: close
 
------WebKitFormBoundaryExploit
Content-Disposition: form-data; name="editormd-image-file"; filename="shell.php"
Content-Type: text/plain
 
<?php phpinfo(); ?>
------WebKitFormBoundaryExploit--

The server processes the request and writes the payload to the Public/Uploads/ directory. The application then returns a JSON response containing the exact path to the newly created file, typically structured as {"success":1, "url":"/Public/Uploads/[date]/[hash].php"}.

The attacker issues a subsequent GET request to the URL provided in the JSON response to execute the web shell. This execution grants the attacker command execution capabilities on the underlying operating system.

Impact Assessment

The vulnerability allows an unauthenticated attacker to achieve arbitrary code execution. This represents a complete compromise of the application's confidentiality, integrity, and availability. The executed code runs with the privileges of the web server process (e.g., www-data or apache).

An attacker can leverage this access to read sensitive configuration files, including database credentials. The access also permits the modification or deletion of existing documentation stored within ShowDoc, directly impacting organizational knowledge bases.

The CVSS v4.0 base score is 9.4, reflecting the critical severity of unauthenticated remote code execution. The high score is driven by the minimal attack complexity, the lack of authentication requirements, and the severe downstream impact on the host system.

The EPSS score of 0.01614 places this vulnerability in the 81.78th percentile for expected exploitation. The availability of public proof-of-concept exploits and documented active exploitation significantly elevates the immediate risk profile for internet-facing installations.

Remediation and Mitigation

The primary remediation strategy is upgrading ShowDoc to version 2.8.7 or later. This version contains the corrected property assignment and properly restricts file uploads to the intended image formats. Organizations should apply this update immediately to all accessible instances.

Administrators who cannot immediately apply the upgrade must manually modify the codebase. The fix requires opening the server/Application/Home/Controller/PageController.class.php file and changing the $upload->allowExts variable assignment to $upload->exts.

Network-level mitigations provide an additional layer of defense while patching is underway. Organizations should deploy Web Application Firewall (WAF) rules to intercept POST requests targeting the upload endpoint that contain executable file extensions in the filename field.

Security teams must review the Public/Uploads/ directory for existing .php, .php5, or .phtml files. Any executable files found in this directory indicate prior exploitation and require immediate incident response procedures, including server isolation and forensic analysis.

Official Patches

ShowDocPull Request #1059 fixing the vulnerability by correcting the property name

Technical Appendix

CVSS Score
9.4/ 10
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:L/SC:H/SI:H/SA:L
EPSS Probability
1.61%
Top 18% most exploited

Affected Systems

ShowDoc versions < 2.8.7ThinkPHP 3.x (underlying framework configuration)

Affected Versions Detail

Product
Affected Versions
Fixed Version
ShowDoc
ShowDoc
< 2.8.72.8.7
AttributeDetail
CWE IDCWE-434
Attack VectorNetwork
CVSS v4.09.4 (Critical)
EPSS Percentile81.78%
Exploit StatusActive Exploitation / PoC Available
AuthenticationNone Required

MITRE ATT&CK Mapping

T1105Ingress Tool Transfer
Command and Control
T1059Command and Scripting Interpreter
Execution
CWE-434
Unrestricted Upload of File with Dangerous Type

The product allows the attacker to upload or transfer files of dangerous types that can be automatically processed within the product's environment.

Known Exploits & Detection

VulhubProof of Concept and exploitation guide for the ShowDoc RCE vulnerability

References & Sources

  • [1]Official Patch (GitHub)
  • [2]Vulhub Exploit Guide
  • [3]VulnCheck Advisory
  • [4]CNVD Record
  • [5]GitHub Advisory

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 13 hours ago•CVE-2026-11748
6.9

CVE-2026-11748: Unauthenticated LDAP Injection in Central Dogma Server Authentication

An LDAP injection vulnerability exists in the centraldogma-server-auth-shiro module of LY Corporation Central Dogma before version 0.84.0. The search logic dynamically constructs LDAP search filters by interpolating user-provided usernames without escaping RFC 4515 metacharacters. Unauthenticated remote attackers can leverage this flaw to bypass authentication, enumerate directory hierarchies, and access unauthorized resources.

Alon Barad
Alon Barad
7 views•6 min read
•about 14 hours ago•CVE-2026-11746
9.4

CVE-2026-11746: Use of Hard-coded ZooKeeper Replication Secret 'ch4n63m3' in Central Dogma Server

CVE-2026-11746 is a critical vulnerability in Central Dogma Server prior to version 0.84.0, where an embedded ZooKeeper replication secret silently falls back to a publicly known, hard-coded default string ('ch4n63m3'). Remote attackers with access to the replication network can authenticate as legitimate cluster peers, potentially leading to unauthorized data exposure, state manipulation, or complete cluster takeover.

Amit Schendel
Amit Schendel
3 views•6 min read
•about 15 hours ago•CVE-2026-56665
4.2

CVE-2026-56665: Logical Validation Bypass in ZITADEL External JWT Identity Provider

A logical verification flaw in ZITADEL's external JWT Identity Provider validation allows attackers to bypass session expiration checks. If an incoming JWT lacks the 'exp' claim, the system skips validation entirely, creating an indefinitely valid session. This issue has been addressed in versions 3.4.12 and 4.15.2.

Alon Barad
Alon Barad
4 views•7 min read
•about 16 hours ago•CVE-2026-59149
6.5

CVE-2026-59149: Sibling Directory Path Traversal in Mockoon Backend Server

CVE-2026-59149 identifies a directory traversal vulnerability in `@mockoon/commons-server`, the backend mock-server library powering the Mockoon application. The flaw occurs in the path containment validation logic used during raw file response generation. An unauthenticated attacker can exploit this weakness to retrieve arbitrary files from sibling directories sharing a common prefix with the designated static base directory.

Amit Schendel
Amit Schendel
6 views•5 min read
•about 17 hours ago•CVE-2026-59148
8.8

CVE-2026-59148: Unauthenticated Administrative API and CORS Misconfiguration in Mockoon

An in-depth analysis of CVE-2026-59148, a high-severity flaw in Mockoon where unauthenticated administrative endpoints and a wildcard Cross-Origin Resource Sharing (CORS) policy allow remote execution, state poisoning, and credential theft.

Alon Barad
Alon Barad
5 views•6 min read
•about 18 hours ago•CVE-2026-56666
4.8

CVE-2026-56666: Account Takeover via Improper Email Verification in ZITADEL Federated Identity Handler

An improper authentication vulnerability (CWE-287) in ZITADEL's external identity provider handler before version 4.15.3 allows remote attackers to perform complete account takeover. When auto-linking by email is enabled, ZITADEL verifies that the local target account has a verified email address but fails to verify if the external provider confirmed ownership of that same email. Attackers can exploit this by registering an unverified account with a victim's email address on a permissive external provider, leading to unauthorized account binding and persistent access.

Amit Schendel
Amit Schendel
2 views•7 min read