ThinkPHP Framework vulnerable to remote code executionGHSA-p4qr-vq2g-22wp
CRITICALFix: top-think/framework@c4acb8bGHSA-p4qr-vq2g-22wp is a critical-severity (CVSS 9.8) Path Traversal vulnerability in topthink/framework. 1 public exploit reference exists, so weaponization risk is real. A fix is available for topthink/framework — see the affected versions and patch details below.
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
- A successful exploit gives an attacker total control of the affected component, not partial access.
Exploitation and automatability from CISA’s SSVC triage for GHSA-p4qr-vq2g-22wp.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
GHSA-p4qr-vq2g-22wp by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.
Where this sits among everything scored
Of 395,492 CVEs with a current EPSS score, this one falls in the 10–50% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
topthink/frameworkReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Packagist packages — download data is not available via public APIs for these ecosystems.
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.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐘Packagist | topthink/framework | all versions | 6.0.14composer require topthink/framework:^6.0.14 |
Affected Products
thinkphpthinkphpResearch use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for topthink/framework, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update topthink/framework to 6.0.14 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-p4qr-vq2g-22wp is resolved across your whole dependency graph.
Workarounds
Resolve every user-supplied path to its canonical form and reject anything that escapes the intended directory, and run the component under an account that has no read or write access outside the directory it legitimately serves.
How to detect GHSA-p4qr-vq2g-22wp
A community-maintained Nuclei template exists for this CVE. You can scan for it directly:
nuclei -id ghsa-p4qr-vq2g-22wp -u https://target- Template
- Thinkphp Lang - Local File Inclusion
- 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.
Template by ProjectDiscovery nuclei-templates (kagamigawa), MIT licensed. View the full template. Scan only systems you are authorised to test.
Frequently Asked Questions
Is GHSA-p4qr-vq2g-22wp in your dependencies?
Find it across Packagist, including transitive dependencies.