Cyber Resilience

CVE-2018-25270

Access Control in Thinkphp 5.0.0 – 5.0.23

Public PoCAccess Control
Published
22 April 2026
Modified
27 April 2026
Patch / advisory
CVSS Score v4 9.3
Click a component to see what it means
Raw vectorCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
EPSS Score 0.0089 56th percentile
Risk Priority 70 floored blend · peak EPSS

Summary

CVE-2018-25270 is a critical-severity Authorization Bypass Through User-Controlled Key (CWE-639) vulnerability in Thinkphp Thinkphp. Its CVSS base score is 9.3 (Critical).

Operationally, exploitation aligns with the MITRE ATT&CK technique Exploit Public-Facing Application (T1190); ranked in the top 44% of CVEs by exploit likelihood; it is not currently listed in the CISA KEV catalog; a public proof-of-concept is referenced.

The strongest mitigations our analysis identified map to SI-10 (Information Input Validation) and SI-2 (Flaw Remediation) — see the control section below for these in your framework.

Deeper analysis AI-assisted summary

Synthesised by an AI model from the NVD description and linked references — a reading aid, not an authoritative source.

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.

OWASP Top 10 for Web (2025)

EU & UK References

Vulnerability Data

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.

CWE(s)

Related Threats

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

CVEs Like This One

CVE-2025-50706Same product: Thinkphp Thinkphp
CVE-2024-48112Same product: Thinkphp Thinkphp
CVE-2025-50707Same product: Thinkphp Thinkphp
CVE-2024-44902Same product: Thinkphp Thinkphp
CVE-2025-63888Same product: Thinkphp Thinkphp
CVE-2024-34467Same product: Thinkphp Thinkphp
CVE-2025-63889Same product: Thinkphp Thinkphp
CVE-2026-52699Shared CWE-639
CVE-2026-1496Shared CWE-639
CVE-2026-31867Shared CWE-639

Affected Assets

thinkphp
thinkphp
5.1.31 · 5.0.0 — 5.0.23

Mitigating Controls

Control response

Prevent
Stop it (NIST 800-53)
  • SI-2 Flaw Remediation
  • SI-10 Information Input Validation
  • CM-6 Configuration Settings
Detect
Catch it (NIST detect / respond)

Harden
Shrink the surface (DISA STIG)

Validate
Prove the fix (OWASP ASVS)

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.

Mitigating Controls (NIST CSF 2.0) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.

PR.AA-05 full match
prevents

Enforcing authorization policy and least privilege directly blocks user-controlled key tampering that bypasses access checks.

PR.IR-01 mostly match
prevents

Logical access controls prevent unauthorized data access that results from missing authorization checks on object references.

Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.

detects

Security testing can detect missing authorization checks but does not prevent the weakness in production.

prevents

Information access restriction explicitly enforces that users may only retrieve data they are authorized to see, directly addressing user-controlled key bypass.

prevents

Access control policy directly requires enforcement of authorization rules that prevent unauthorized access via manipulated keys.

prevents

Managing access rights includes ensuring users can only access their own records and not bypass authorization by altering identifiers.

mitigates

Privileged access rights control restricts what data each user may access, mitigating direct object reference attacks.

prevents

Secure development lifecycle includes authorization design but does not itself implement runtime access checks.

References