Skip to main content
COSMICBYTEZLABS
NewsSecurityHOWTOsToolsStudyTraining
ProjectsChecklistsAI RankingsNewsletterStatusTagsAbout
Subscribe

Press Enter to search or Esc to close

News
Security
HOWTOs
Tools
Study
Training
Projects
Checklists
AI Rankings
Newsletter
Status
Tags
About
RSS Feed
Reading List
Subscribe

Stay in the Loop

Get the latest security alerts, tutorials, and tech insights delivered to your inbox.

Subscribe NowFree forever. No spam.
COSMICBYTEZLABS

Your trusted source for IT intelligence, cybersecurity insights, and hands-on technical guides.

754+ Articles
120+ Guides

CONTENT

  • Latest News
  • Security Alerts
  • HOWTOs
  • Projects
  • Exam Prep

RESOURCES

  • Search
  • Browse Tags
  • Newsletter Archive
  • Reading List
  • RSS Feed

COMPANY

  • About Us
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CosmicBytez Labs. All rights reserved.

System Status: Operational
  1. Home
  2. Security
  3. CVE-2018-25270: ThinkPHP 5.0.23 Remote Code Execution via Routing Parameter
CVE-2018-25270: ThinkPHP 5.0.23 Remote Code Execution via Routing Parameter

Critical Security Alert

This vulnerability is actively being exploited. Immediate action is recommended.

SECURITYCRITICALCVE-2018-25270

CVE-2018-25270: ThinkPHP 5.0.23 Remote Code Execution via Routing Parameter

ThinkPHP 5.0.23 contains a critical unauthenticated remote code execution vulnerability allowing attackers to invoke arbitrary PHP functions via a crafted routing parameter in the index.php endpoint, achieving full server compromise without credentials.

Dylan H.

Security Team

April 23, 2026
4 min read

Affected Products

  • ThinkPHP 5.0.23

CVE-2018-25270: Unauthenticated RCE in ThinkPHP 5.0.23

A critical remote code execution vulnerability originally identified in 2018 has been formally catalogued in the NVD as CVE-2018-25270, carrying a CVSS score of 9.8 (Critical). The flaw resides in ThinkPHP 5.0.23, a widely deployed PHP web application framework with significant adoption across Chinese-language web ecosystems and beyond.

The vulnerability allows unauthenticated remote attackers to execute arbitrary PHP functions — including system() and passthru() — by crafting a malicious HTTP request to the index.php endpoint and injecting a callable function name through the routing parameter. No credentials or prior access are required.


Vulnerability Overview

AttributeValue
CVE IDCVE-2018-25270
CVSS Score9.8 (Critical)
CWE ClassificationCWE-77 — Improper Neutralization of Special Elements used in a Command
Affected SoftwareThinkPHP 5.0.23
Attack VectorNetwork
Authentication RequiredNone
Privileges RequiredNone
User InteractionNone
NVD PublishedApril 22, 2026
Original Flaw Discovery2018

Technical Details

ThinkPHP 5.0.23 is vulnerable because its routing engine accepts and processes a _method parameter that controls how the framework resolves and invokes controller methods. When the application is accessed via the captcha route, an attacker can override the HTTP method through _method=__construct and inject a callable function name via the filter[] parameter.

Example attack request:

GET /index.php?s=captcha HTTP/1.1
 
_method=__construct&filter[]=system&method=get&get[]=id

This causes ThinkPHP to invoke system("id") — or any other PHP callable — server-side, returning the command output to the attacker. The payload can be adapted to run arbitrary OS commands.

Impact of successful exploitation:

  • Execute arbitrary OS commands — full shell access on the web server
  • Read sensitive files — configuration files, environment variables, database credentials
  • Deploy webshells — persistent backdoor access to the server
  • Pivot to internal network — lateral movement from the compromised host
  • Data exfiltration — access to any data reachable from the server process

Context and Impact

ThinkPHP is a popular MVC framework in PHP, particularly within the Chinese developer community, and version 5.0.x saw significant adoption before the 5.1.x and 6.x branches superseded it. While the vulnerability dates to 2018, its late formal CVE assignment means it is now surfacing in vulnerability scanners and compliance tools for the first time.

Who is affected:

  • Any web application running ThinkPHP 5.0.23 with public-facing HTTP access
  • Legacy systems, older e-commerce platforms, or inherited codebases not updated since 2018

Real-world exploitation history: This class of ThinkPHP routing injection vulnerabilities was actively mass-exploited in 2018–2019 by automated scanning campaigns that leveraged the flaw to install cryptominers, webshells, and botnets. Public proof-of-concept code has been available since the original disclosure.


Remediation

  1. Upgrade ThinkPHP — migrate from 5.0.23 to ThinkPHP 6.x or the latest supported release, which addresses this class of routing injection vulnerabilities
  2. Restrict access if upgrade is not feasible — disable or restrict access to the captcha route and any routes that allow __construct method invocation via request parameters
  3. Web Application Firewall — deploy WAF rules to detect and block requests containing _method=__construct and filter[]=system patterns
  4. Audit for compromise — if running ThinkPHP 5.0.23, review web server logs for signs of exploitation:
grep -i "_method=__construct" /var/log/nginx/access.log
grep -i "filter\[" /var/log/nginx/access.log
  1. File integrity monitoring — scan the webroot for unexpected .php files that may indicate a deployed webshell

Note: No official backport patch exists for ThinkPHP 5.0.23. Upgrading to a supported version is the only reliable remediation.


Key Takeaways

  1. CVE-2018-25270 is a critical unauthenticated RCE in ThinkPHP 5.0.23, now formally catalogued in NVD with CVSS 9.8
  2. No authentication required — any unauthenticated attacker with HTTP access can achieve remote code execution
  3. Exploitation is trivial — public PoC has existed since 2018; automated scanning campaigns targeted this vulnerability extensively
  4. Upgrade is the only safe fix — ThinkPHP 5.0.23 should be treated as end-of-life
  5. Audit existing deployments — organizations running legacy PHP applications should scan for ThinkPHP 5.0.x versions

Sources

  • CVE-2018-25270 — NIST NVD
#CVE-2018-25270#ThinkPHP#Remote Code Execution#PHP#NVD#Vulnerability

Related Articles

CVE-2018-25272: ELBA5 5.8.0 RCE via Default Database Credentials and xp_cmdshell

ELBA5 5.8.0 contains a critical remote code execution vulnerability where default database connector credentials allow attackers to connect to the embedded SQL Server instance, decrypt the DBA password, and execute arbitrary OS commands with SYSTEM-level privileges.

5 min read

CVE-2026-5272: Chrome GPU Heap Buffer Overflow Enables Remote Code Execution

A high-severity heap buffer overflow in Chrome's GPU component allows remote attackers to execute arbitrary code via a crafted HTML page. Affects all...

4 min read

CVE-2015-20118: Stored XSS in RealtyScript 4.0.2 Admin Interface

A stored cross-site scripting vulnerability in RealtyScript 4.0.2 allows attackers to inject malicious JavaScript via the location_name parameter in the...

4 min read
Back to all Security Alerts