Cyber Posture

CVE-2018-25270

CriticalPublic PoC

Published: 22 April 2026

Published
22 April 2026
Modified
27 April 2026
KEV Added
Patch
CVSS Score 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS Score 0.0094 76.4th percentile
Risk Priority 20 60% EPSS · 20% KEV · 20% CVSS

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…

more

with application privileges.

Mitigating Controls (NIST 800-53 r5)AI

prevent

Directly mitigates the RCE vulnerability by requiring timely patching of ThinkPHP beyond version 5.0.23 to eliminate the arbitrary function invocation flaw.

prevent

Prevents exploitation by enforcing validation and sanitization of routing parameters to block unauthenticated arbitrary PHP code execution.

prevent

Addresses the vulnerability by enforcing secure configuration settings for ThinkPHP routing to restrict exposure of function invocation capabilities.

Security SummaryAI

CVE-2018-25270 is a remote code execution vulnerability in ThinkPHP version 5.0.23, a popular PHP framework. The flaw arises from the ability to invoke arbitrary functions through the routing parameter, enabling unauthenticated attackers to execute arbitrary PHP code. Specifically, attackers can craft malicious requests to the index.php endpoint with function parameters that trigger system command execution under the application's privileges. The vulnerability is rated with a CVSS v3.1 base score of 9.8 (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H) and is associated with CWE-639 (Authorization Bypass Through User-Controlled Key).

Any unauthenticated remote attacker can exploit this vulnerability without user interaction or privileges, as it requires low complexity and no special access. By sending a tailored HTTP request to the vulnerable index.php endpoint, the attacker can invoke dangerous PHP functions, leading to full remote code execution on the server. This grants high confidentiality, integrity, and availability impacts, potentially allowing full server compromise, data exfiltration, or further lateral movement within the environment.

Mitigation guidance and patches are referenced in official and third-party advisories, including the ThinkPHP framework GitHub repository at https://github.com/top-think/framework/, the official ThinkPHP site at https://thinkphp.cn, an Exploit-DB entry at https://www.exploit-db.com/exploits/45978 detailing a proof-of-concept, and a VulnCheck advisory at https://www.vulncheck.com/advisories/thinkphp-remote-code-execution-via-invokefunction. Practitioners should upgrade to a patched version of ThinkPHP beyond 5.0.23 and review routing configurations for exposed function invocation.

A public exploit is available on Exploit-DB, indicating potential for widespread abuse in unpatched installations, though no specific real-world campaigns are detailed in the provided information.

Details

CWE(s)

Affected Products

thinkphp
thinkphp
5.1.31 · 5.0.0 — 5.0.23

MITRE ATT&CK Enterprise TechniquesAI

T1190 Exploit Public-Facing Application Initial Access
Adversaries may attempt to exploit a weakness in an Internet-facing host or system to initially access a network.
Why these techniques?

CVE-2018-25270 enables unauthenticated remote code execution via crafted HTTP requests to a public-facing PHP web framework (ThinkPHP), directly mapping to T1190: Exploit Public-Facing Application.

Confidence: HIGH · MITRE ATT&CK Enterprise v19.0

References