CVE-2022-1034

7.2 HIGH

📋 TL;DR

CVE-2022-1034 is an unrestricted file upload vulnerability in ShowDoc v2.10.3 that allows attackers to upload malicious files without proper validation. This affects all ShowDoc installations running version 2.10.3 or earlier. Attackers could potentially execute arbitrary code on the server by uploading executable files.

💻 Affected Systems

Products:
  • ShowDoc
Versions: v2.10.3 and earlier
Operating Systems: All platforms running ShowDoc
Default Config Vulnerable: ⚠️ Yes
Notes: All default installations of affected versions are vulnerable. No special configuration required for exploitation.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution leading to complete system compromise, data theft, and lateral movement within the network.

🟠

Likely Case

Webshell deployment allowing persistent access, file manipulation, and potential privilege escalation.

🟢

If Mitigated

File uploads blocked or sanitized, limiting impact to denial of service through storage exhaustion.

🌐 Internet-Facing: HIGH - Internet-facing ShowDoc instances are directly exploitable without authentication.
🏢 Internal Only: MEDIUM - Internal instances still vulnerable but require network access; risk depends on internal segmentation.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Exploit requires simple HTTP requests to upload malicious files. Public proof-of-concept available in vulnerability reports.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: v2.10.4

Vendor Advisory: https://github.com/star7th/showdoc/commit/bd792a89c0325836fbd64784f4c4117c0171416b

Restart Required: No

Instructions:

1. Backup your ShowDoc data and configuration. 2. Download ShowDoc v2.10.4 or later from GitHub. 3. Replace the existing installation files with the patched version. 4. Verify the update by checking the version in the admin panel.

🔧 Temporary Workarounds

Web Server File Upload Restriction

all

Configure web server (Apache/Nginx) to block file uploads to vulnerable endpoints

# Nginx example: location ~* \.(php|phtml|sh|exe)$ { deny all; }
# Apache example: <FilesMatch "\.(php|phtml|sh|exe)$"> Order Allow,Deny Deny from all </FilesMatch>

Application Firewall Rules

all

Implement WAF rules to block malicious file upload patterns

# Example ModSecurity rule: SecRule FILES_TMPNAMES "@rx \.(php|phtml|sh|exe)$" "id:1001,phase:2,deny,msg:'Malicious file upload attempt'"

🧯 If You Can't Patch

  • Implement strict file upload validation at the application layer, allowing only specific safe file types
  • Deploy network segmentation to isolate ShowDoc instances and restrict access to trusted IPs only

🔍 How to Verify

Check if Vulnerable:

Check ShowDoc version in admin panel or via package.json file. If version is 2.10.3 or earlier, system is vulnerable.

Check Version:

cat /path/to/showdoc/package.json | grep version

Verify Fix Applied:

After patching, attempt to upload a file with dangerous extension (e.g., .php, .exe). Upload should be rejected with proper error message.

📡 Detection & Monitoring

Log Indicators:

  • HTTP POST requests to upload endpoints with suspicious file extensions
  • Successful uploads of executable files
  • Unusual file creation in upload directories

Network Indicators:

  • Multiple file upload attempts with different extensions
  • POST requests to /server/index.php?s=/api/page/upload

SIEM Query:

source="web_server" method="POST" uri="*upload*" (extension="php" OR extension="exe" OR extension="sh" OR extension="phtml")

🔗 References

📤 Share & Export