CVE-2025-0520: ShowDoc Unrestricted File Upload Vulnerability Leading to Remote Code Execution

showdoc/showdoc Updated 14 Dec 2025

Summary

29/04/2025
Yes i
Critical
9.4

CVE-2025-0520: ShowDoc unrestricted file upload vulnerability. Affects showdoc/showdoc versions < 2.8.7. Fixed in 2.8.7. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

ShowDoc is an open-source documentation management tool that allows users to create, manage, and share documentation easily. It is widely used for project documentation, API documentation, and collaborative writing. However, prior to version 2.8.7, ShowDoc is vulnerable to an unrestricted file upload issue that can lead to serious security risks.

Vulnerability Detail

The vulnerability arises from improper validation of file extensions during file uploads. This flaw allows an attacker to upload arbitrary PHP files, which can then be executed on the server. The consequences of this vulnerability include remote code execution, where an attacker can run malicious code on the server, potentially compromising the entire application and its data.

How To Fix

Minimum fixed version

2.8.7

This is the first release that contains the fix.

composer require showdoc/showdoc:2.8.7

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, you can restrict file uploads by implementing server-side checks to validate file types and extensions. For example, you can modify your upload script to only allow specific file types, such as images or documents, and reject any PHP files. Here is a sample code snippet for validation:

if (isset($_FILES['uploaded_file'])) {
    $file_type = pathinfo($_FILES['uploaded_file']['name'], PATHINFO_EXTENSION);
    $allowed_types = ['jpg', 'jpeg', 'png', 'gif', 'pdf'];
    if (!in_array($file_type, $allowed_types)) {
        die('Invalid file type.');
    }
    // Proceed with the upload
}

Conclusion

The unrestricted file upload vulnerability in ShowDoc poses a significant risk, allowing for remote code execution. It is crucial to update to version 2.8.7 or later to mitigate this risk. Additionally, implementing server-side validation can serve as a temporary measure to protect against potential exploitation.

See every vulnerability recorded for showdoc/showdoc →

Share this vulnerability

FAQ

The vulnerability is an unrestricted file upload issue that allows attackers to upload and execute arbitrary PHP files.

ShowDoc versions prior to 2.8.7 are affected by this vulnerability.

The vulnerability can lead to remote code execution, allowing attackers to run malicious code on the server.

You can use Vulert, which monitors open-source vulnerabilities in real-time. You can check your application against this vulnerability using the Vulert playground without any signup.

If you cannot update, implement strict server-side file validation as a temporary workaround to mitigate the risk.

Related vulnerabilities

Recent vulnerabilities recorded for showdoc/showdoc.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Minimum fixed version

2.8.7

This is the first release that contains the fix.

composer require showdoc/showdoc:2.8.7

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback