CVE-2025-63888

9.8 CRITICAL

📋 TL;DR

A remote code execution vulnerability exists in ThinkPHP 5.0.24's template file driver. Attackers can exploit the read function in File.php to execute arbitrary code on affected systems. This affects all deployments running ThinkPHP 5.0.24 with the vulnerable component.

💻 Affected Systems

Products:
  • ThinkPHP
Versions: 5.0.24
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects installations using the File template driver component. ThinkPHP 5.0.24 is the specific vulnerable version.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full system compromise allowing attackers to execute arbitrary commands, steal data, install malware, pivot to other systems, and maintain persistent access.

🟠

Likely Case

Webshell deployment leading to data exfiltration, credential theft, and lateral movement within the network.

🟢

If Mitigated

Limited impact with proper WAF rules, network segmentation, and minimal privileges preventing lateral movement.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Public exploit code exists in GitHub gists. Exploitation requires network access to vulnerable endpoint but no authentication.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 5.0.25 or later

Vendor Advisory: https://www.thinkphp.cn/

Restart Required: No

Instructions:

1. Backup current installation. 2. Update ThinkPHP to version 5.0.25 or higher. 3. Verify the File.php file has been updated. 4. Test application functionality.

🔧 Temporary Workarounds

Disable File Template Driver

all

Temporarily disable the vulnerable File template driver if not required

Modify configuration to use alternative template driver

WAF Rule Implementation

all

Block malicious requests targeting the vulnerable endpoint

Add WAF rule to block requests containing think\template\driver\File.php patterns

🧯 If You Can't Patch

  • Implement strict network segmentation to isolate vulnerable systems
  • Deploy application-level firewall rules to block exploitation attempts

🔍 How to Verify

Check if Vulnerable:

Check if thinkphp/library/think/template/driver/File.php exists and contains vulnerable read function in version 5.0.24

Check Version:

Check composer.json or framework version file for '5.0.24'

Verify Fix Applied:

Verify ThinkPHP version is 5.0.25+ and File.php has been updated

📡 Detection & Monitoring

Log Indicators:

  • Unusual POST/GET requests to template endpoints
  • File inclusion attempts in access logs
  • Unexpected process execution from web server

Network Indicators:

  • HTTP requests containing think/template/driver/File.php patterns
  • Outbound connections from web server to unknown IPs

SIEM Query:

source="web_logs" AND (uri="*think/template/driver/File.php*" OR user_agent="*thinkphp*" AND status=200)

🔗 References

📤 Share & Export