CVE-2022-47945Thinkphp
Critical 9.8 No auth needed
Follow: this CVE · Thinkphp · Thinkphp We alert you by email or Slack (account required).
- Priority
- 75
- CVSS 3.1
- 9.8
- EPSS
- 9.3% probability of exploitation in 30 days · percentile 96
- Auth required
- No
- Published
- Dec 23, 2022
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-22
- SSVC (CISA)
- Exploitation: proof of concept · Automatable: yes · Technical impact: total
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
What happens
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.
What to do
- Apply the vendor's security update for Thinkphp.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| Packagist | topthink/framework |
< 6.0.14 |
6.0.14 |
composer require "topthink/framework:^6.0.14" |
Per OSV / GitHub Advisories (GHSA-p4qr-vq2g-22wp). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| thinkphp | thinkphp | < 6.0.14 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Patch Third Party Advisory
- github.com Patch Third Party Advisory
- tttang.com Exploit Third Party Advisory