CVE-2022-47945 ThinkPHP Framework vulnerable to remote code execution
Remote attackers can execute arbitrary OS commands via local file inclusion in ThinkPHP when the language pack feature is enabled.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2022-47945?
CVE-2022-47945 is a critical path traversal vulnerability in n/a, published on 23 Dec 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
ThinkPHP Framework before 6.0.14 allows local file inclusion via the lang parameter when the language pack feature is enabled (lang_switch_on=true). An unauthenticated and remote attacker can exploit this to execute arbitrary operating system commands, as demonstrated by including pearcmd.php.
Weakness: CWE-22
Which versions are affected by CVE-2022-47945?
2 open source packages ship an affected version, including topthink/framework. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
topthink/framework Packagist | All versions | 6.0.14 |
topthink/framework Packagist | All versions | 6.0.14 |
Products include Thinkphp Thinkphp.
How do I fix CVE-2022-47945?
Upgrade topthink/framework to 6.0.14 or later.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2022-47945 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-47945 exists.
Public exploit code: 1 Nuclei template.
Other vulnerabilities in n/a
Sources
Also known as GHSA-p4qr-vq2g-22wp.