CVE-2025-50706 ThinkPHP Path Traversal Vulnerability

Critical 9.8 Published Updated

Remote attackers can execute arbitrary code in ThinkPHP via the routecheck function, requiring immediate framework upgrades.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2025-50706?

CVE-2025-50706 is a critical code injection vulnerability in n/a, published on 5 Aug 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

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

Weakness: CWE-94

Which versions are affected by CVE-2025-50706?

2 open source packages ship an affected version, including topthink/framework. It affects 1 product.

PackageAffectedFixed in
topthink/framework PackagistAll versions to 5.1.41None
topthink/framework PackagistAll versions to 5.1.41None

Products include Thinkphp Thinkphp.

How do I fix CVE-2025-50706?

No fix has been published for CVE-2025-50706 yet. Limit exposure of the affected software until one is available.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2025-50706 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-50706 exists.

Sources

Also known as GHSA-mrwc-mvr8-9xq5.

Is CVE-2025-50706 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free