Skip to main content
Mallory
CriticalPublic exploit

ThinkPHP lang parameter LFI to RCE

IdentifiersCVE-2022-47945CWE-98

CVE-2022-47945 affects ThinkPHP Framework before 6.0.14. When the language pack feature is enabled (lang_switch_on=true), the framework improperly handles the lang parameter, allowing an unauthenticated remote attacker to trigger local file inclusion. By causing the application to include attacker-chosen local files, exploitation can be escalated to arbitrary operating system command execution, as demonstrated through inclusion of pearcmd.php. The issue is therefore an LFI in the language-switching mechanism that can become full remote code execution in exposed deployments.

Share:
For your environment

Are you exposed to this one?

Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.

ANALYST BRIEF

Impact, mitigation & remediation

What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation allows unauthenticated remote compromise of vulnerable ThinkPHP applications. Depending on the reachable local file and server configuration, an attacker can execute arbitrary OS commands in the security context of the web server process, leading to full application compromise, malware deployment, cryptominer installation, webshell placement, data access, and potential lateral movement from the affected host.

Mitigation

If you can’t patch tonight, do this now.

As an interim measure, disable lang-based language switching by setting lang_switch_on=false where feasible, especially on internet-facing systems. Restrict or filter requests that supply unexpected lang parameter values, and use WAF rules or reverse-proxy filtering to block known exploitation patterns targeting the lang parameter. Reduce post-exploitation impact by limiting web-server privileges, removing unnecessary local PHP utilities such as pearcmd.php where not needed, and monitoring for suspicious requests and command execution from the web application context.

Remediation

Patch, then assume compromise.

Upgrade ThinkPHP Framework to 6.0.14 or later. If the application does not require multi-language switching, disable the language pack switching feature. Review application code and configuration to ensure untrusted input cannot influence file inclusion paths via the lang parameter. Validate that vulnerable deployments are no longer exposing exploitable language-pack behavior after upgrade.
PUBLIC EXPLOITS

Exploits

No public exploits tracked yet. Mallory keeps watching.

VALID 0 / 0 TOTALView more in app

No public exploit code observed for this vulnerability.

EXPOSURE SURFACE

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
ThinkphpThinkphpapplication

Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.

What this page doesn’t show

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, which detections to deploy, and what to do tonight.
Exposure mapping

Query your assets running an affected version, and investigate the blast radius.

Threat actor evidence1

Every observed campaign linking this CVE to a named adversary.

Associated malware10

Malware families riding this exploit, with evidence and IOCs.

Detection signatures1

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

Vendor-by-vendor mapping

Cross-references every affected SKU, including bundled OEM variants.

Social activity2

Community discussion across Reddit, Mastodon, and other social sources.