CVE-2021-36544

7.5 HIGH

📋 TL;DR

CVE-2021-36544 is an incorrect access control vulnerability in tpcms 3.2 that allows remote attackers to view sensitive information by manipulating paths in application URLs. This affects all systems running tpcms 3.2 with default configurations, potentially exposing confidential data to unauthorized users.

💻 Affected Systems

Products:
  • tpcms
Versions: Version 3.2
Operating Systems: All operating systems running tpcms
Default Config Vulnerable: ⚠️ Yes
Notes: All installations of tpcms 3.2 are vulnerable unless specifically hardened. The vulnerability exists in the core CMS functionality.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers could access sensitive configuration files, database credentials, user data, or administrative information, leading to complete system compromise or data breach.

🟠

Likely Case

Unauthenticated attackers can enumerate and download sensitive files from the web server, potentially obtaining configuration details or user information.

🟢

If Mitigated

With proper access controls and file permissions, impact is limited to non-sensitive files or returns access denied errors.

🌐 Internet-Facing: HIGH - The vulnerability is remotely exploitable without authentication and affects web applications directly exposed to the internet.
🏢 Internal Only: MEDIUM - Internal attackers or compromised internal systems could exploit this to escalate privileges or access sensitive data.

🎯 Exploit Status

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

Exploitation involves simple path traversal or directory listing techniques. The vulnerability is well-documented in public issue trackers.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Version after 3.2 (check latest release)

Vendor Advisory: https://gitee.com/happy_source/tpcms/issues/I3YNWY

Restart Required: No

Instructions:

1. Backup your current installation. 2. Download the latest version of tpcms from the official repository. 3. Replace vulnerable files with patched versions. 4. Verify file permissions are properly set. 5. Test the application functionality.

🔧 Temporary Workarounds

Web Server Access Restrictions

all

Configure web server to restrict access to sensitive directories and files

# Apache: Add to .htaccess
<FilesMatch "\.(php|inc|conf|sql|log)$">
  Order allow,deny
  Deny from all
</FilesMatch>
# Nginx: Add to server block
location ~ /\.(php|inc|conf|sql|log)$ {
  deny all;
}

File Permission Hardening

all

Set restrictive file permissions on sensitive directories

# Linux/Unix
chmod 600 sensitive_config_file.conf
chmod 700 protected_directory/
# Windows
icacls sensitive_file.txt /deny Everyone:(R)

🧯 If You Can't Patch

  • Implement web application firewall (WAF) rules to block path traversal patterns
  • Move sensitive files outside web root directory and implement proper access controls

🔍 How to Verify

Check if Vulnerable:

Attempt to access sensitive files via URL path manipulation (e.g., /../../config.php). If accessible, system is vulnerable.

Check Version:

Check tpcms version in admin panel or look for version.php file

Verify Fix Applied:

After patching, attempt the same path traversal attacks. All sensitive files should return 403/404 errors or be inaccessible.

📡 Detection & Monitoring

Log Indicators:

  • Multiple 200/403 responses to unusual file paths
  • Requests containing '../' patterns
  • Access to known sensitive file names

Network Indicators:

  • HTTP requests with path traversal sequences
  • Unusual file extensions being requested

SIEM Query:

web.url:*../* AND (response_code:200 OR response_code:403)

🔗 References

📤 Share & Export