CVE-2022-47945
ThinkPHP Framework vulnerable to remote code execution
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
NVD Score used
9.8
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.
- Record
CVE-2022-47945- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-22
- Updated
- 2026-11-02
CVE List
9.8
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.
- Record
CVE-2022-47945- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-22
- Updated
- 2026-11-02
EUVDEUVD-2022-7698
9.8
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.
- Record
EUVD-2022-7698- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-p4qr-vq2g-22wp
9.8
ThinkPHP Framework vulnerable to remote code execution
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.
- Record
GHSA-p4qr-vq2g-22wp- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-22
- Updated
- 2026-11-02
OSV
9.8
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.
- Record
CVE-2022-47945- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVGHSA-p4qr-vq2g-22wp
9.8
ThinkPHP Framework vulnerable to remote code execution
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.
- Record
GHSA-p4qr-vq2g-22wp- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-22
- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
topthink/frameworkPackagist |
before 6.0.14 | 6.0.14 |
topthink/frameworkPackagist |
before 6.0.14, plus listed versions 5.05.0-rc15.0-rc25.0-rc35.0-rc4 Show 45 moreShow lessv5.0.1v5.0.10v5.0.11v5.0.12v5.0.13v5.0.14v5.0.15v5.0.16v5.0.17v5.0.18v5.0.19v5.0.2v5.0.20v5.0.21v5.0.22v5.0.23v5.0.24v5.0.25v5.0.3v5.0.4v5.0.5v5.0.6v5.0.7v5.0.8v5.0.9v5.1-beta.1v5.1-rc.1v5.1-rc.2v5.1-rc.3v5.1.0v5.1.1v5.1.10v5.1.11v5.1.12v5.1.13v5.1.14v5.1.15v5.1.16v5.1.17v5.1.18v5.1.19v5.1.2v5.1.20v5.1.21v5.1.22 |
6.0.14 |
Public exploits
Links only. Every CVE stores no exploit code.
| Source | Link | Date |
|---|---|---|
| Nuclei | Thinkphp Lang - Local File Inclusion |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, GitHub Advisories, Nuclei, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2022-47945 is a critical vulnerability (CVSS 9.8) in Thinkphp, published December 23, 2022. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 30.2%, the 98th percentile. Fixed in topthink/framework 6.0.14.
References
tttang.com/archive/1865
github.com/top-think/framework/commit/c4acb8b4001b98a0078eda25840d33e295a7f099
github.com/top-think/framework/compare/v6.0.13...v6.0.14
nvd.nist.gov/vuln/detail/CVE-2022-47945
github.com/advisories/GHSA-p4qr-vq2g-22wp
github.com/CVEProject/cvelistV5/tree/main/cves/2022/47xxx/CVE-2022-47945.json
github.com/top-think/framework
Left out here: 50 versions. The JSON record has them.