VYPR
Critical severityNVD Advisory· Published Aug 5, 2025· Updated Aug 5, 2025

CVE-2025-50706

CVE-2025-50706

Description

An issue in thinkphp v.5.1 allows a remote attacker to execute arbitrary code via the routecheck function

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

A file inclusion vulnerability in ThinkPHP 5.1's route check allows remote attackers to execute arbitrary code on Windows systems.

Vulnerability

Details

CVE-2025-50706 is a file inclusion vulnerability in ThinkPHP version 5.1 that originates from improper handling of the s parameter in the routeCheck function. The framework fails to sanitize path traversal sequences using backslashes (e.g., ..\..\) when processing URL path information, allowing an attacker to include arbitrary files from the filesystem [1].

Exploitation

An unauthenticated attacker can exploit this vulnerability by sending a crafted HTTP request to the index.php endpoint with a malicious s parameter. On Windows systems, the attacker can leverage the PEAR PHP extension to achieve command execution. For example, the following payload includes a configuration file that writes a web shell: /index.php?s=..\..\..\Extensions\php\php7.3.4nts\pear\&+config-create+/<?=phpinfo();?>+1.php [1]. The attack requires no authentication and can be performed remotely over HTTP.

Impact

Successful exploitation allows an attacker to execute arbitrary PHP code on the target server, leading to complete compromise of the web application and potentially the underlying operating system. This can result in data theft, malware installation, and further network penetration. The vulnerability is limited to Windows environments; Linux systems are not affected due to path separator differences [1].

Mitigation

As of the publication date, the vulnerability affects ThinkPHP versions 5.1.0 through 5.1.41 on Windows. Users should upgrade to a later version of ThinkPHP or apply vendor-provided patches. If upgrading is not immediately possible, consider implementing input validation to block path traversal sequences and restricting access to vulnerable endpoints.

AI Insight generated on May 19, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
topthink/frameworkPackagist
<= 5.1.41

Affected products

1
  • thinkphp/thinkphpdescription

Patches

0

No patches discovered yet.

Vulnerability mechanics

AI mechanics synthesis has not run for this CVE yet.

References

4

News mentions

0

No linked articles in our index yet.