CVE-2018-25270

ThinkPHP 5.0.23 Remote Code Execution via invokefunction

Published Apr 22, 2026 CVSS 4.0 · 9.3 Critical EPSS < 1% KEV · Not listed
Description
ThinkPHP 5.0.23 contains a remote code execution vulnerability that allows unauthenticated attackers to execute arbitrary PHP code by invoking functions through the routing parameter. Attackers can craft requests to the index.php endpoint with malicious function parameters to execute system commands with application privileges.

Analysis

AI-generated

Technical impact

ThinkPHP 5.0.23 contains a remote code execution flaw that allows unauthenticated attackers to craft requests to the index.php endpoint with malicious function parameters, enabling the execution of arbitrary PHP code with the privileges of the application. This vulnerability is a classic authorization bypass (CWE-639) and could be leveraged to run system commands, exfiltrate data, or take complete control of the affected server.

Affected Systems

ThinkPHP is a PHP framework that is used widely across web applications. The impact is limited to ThinkPHP installations running the following versions: 5.0.23, 5.1.31, 6.0.15, 6.0.16, 6.1.3 through 6.1.5, and 8.0.0 (including the beta, 8.0.1, 8.0.2, 8.0.3, and 8.0.4 releases.

Risk and Exploitability

The CVSS score of 9.3 places this flaw in the high‑severity category. EPSS is not available, but the absence of authentication and the straightforward HTTP request required for exploitation suggest a high likelihood of real‑world attacks. The vulnerability is not listed in CISA's KEV catalog, yet its potential to allow an attacker to execute code on the server remains significant. Countermeasures would need to prevent unauthenticated use of the invokefunction route or enable robust input validation.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the ThinkPHP security patch or upgrade to a version where the invoke function vulnerability has been removed.
  • If an upgrade is not yet possible, disable the invokefunction feature in the framework configuration or block access to index.php for unauthenticated users via web server rules.
  • Deploy a WAF or similar filtering layer to detect and reject requests containing malicious invokefunction parameters.
  • Monitor web server logs for suspicious usage patterns and enable alerts for repeated invocation attempts.

Generated by OpenCVE AI on April 22, 2026 at 18:27 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
CPEs cpe:2.3:a:thinkphp:thinkphp:*:*:*:*:*:*:*:*
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description ThinkPHP 5.0.23 contains a remote code execution vulnerability that allows unauthenticated attackers to execute arbitrary PHP code by invoking functions through the routing parameter. Attackers can craft requests to the index.php endpoint with malicious function parameters to execute system commands with application privileges.
Title ThinkPHP 5.0.23 Remote Code Execution via invokefunction
First Time appeared Thinkphp
Thinkphp thinkphp
Weaknesses CWE-639
CPEs cpe:2.3:a:thinkphp:thinkphp:5.0.23:*:*:*:*:*:*:*
cpe:2.3:a:thinkphp:thinkphp:5.1.31:*:*:*:*:*:*:*
cpe:2.3:a:thinkphp:thinkphp:6.0.15:*:*:*:*:*:*:*
cpe:2.3:a:thinkphp:thinkphp:6.0.16:*:*:*:*:*:*:*
cpe:2.3:a:thinkphp:thinkphp:6.1.3:*:*:*:*:*:*:*
cpe:2.3:a:thinkphp:thinkphp:6.1.4:*:*:*:*:*:*:*
cpe:2.3:a:thinkphp:thinkphp:6.1.5:*:*:*:*:*:*:*
cpe:2.3:a:thinkphp:thinkphp:8.0.0:*:*:*:*:*:*:*
cpe:2.3:a:thinkphp:thinkphp:8.0.0:beta:*:*:*:*:*:*
cpe:2.3:a:thinkphp:thinkphp:8.0.1:*:*:*:*:*:*:*
cpe:2.3:a:thinkphp:thinkphp:8.0.2:*:*:*:*:*:*:*
cpe:2.3:a:thinkphp:thinkphp:8.0.3:*:*:*:*:*:*:*
cpe:2.3:a:thinkphp:thinkphp:8.0.4:*:*:*:*:*:*:*
Vendors & Products Thinkphp
Thinkphp thinkphp
References
Metrics cvssV3_1

{'score': 9.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}

cvssV4_0

{'score': 9.3, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N'}

Weaknesses
  • CWE-639

    Authorization Bypass Through User-Controlled Key

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Apr 22, 2026, 3:59 PM
Reserved
Apr 22, 2026, 2:32 PM
Status
Analyzed
Published
Apr 22, 2026, 4:16 PM
Modified
Jun 17, 2026, 1:55 AM