CVE-2022-44289
PHP vulnerability analysis and mitigation

Overview

ThinkPHP versions 5.1.41 and 5.0.24 contain a code logic error vulnerability that enables file upload getshell functionality (CVE-2022-44289). The vulnerability was discovered and reported on October 23, 2022 (GitHub Issue).

Technical details

The vulnerability exists in the file upload functionality within ThinkPHP's framework. The issue stems from a logic error in the checkImg() function located in thinkphp/library/think/File.php (line 272). The function's implementation of image file validation contains reversed true/false logic, which fails to properly validate file extensions and allows unauthorized file uploads, including PHP files (GitHub Issue).

Impact

This vulnerability allows attackers to upload malicious PHP files to the server through the file upload functionality, potentially leading to remote code execution via shell access. The impact is severe as it could result in complete server compromise (MITRE CVE).

Exploitability

The vulnerability can be exploited by directly using the move method of ThinkPHP as documented in the official documentation. An attacker can bypass the image file validation checks and upload PHP files with malicious code (GitHub Issue).

Mitigation and workarounds

Users should upgrade to a version newer than ThinkPHP 5.1.41 or 5.0.24 where this vulnerability has been addressed. Additionally, implementing proper file upload validation and restrictions at the application level can help mitigate this vulnerability (MITRE CVE).

Additional resources


SourceThis report was generated using AI

Related PHP vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-54182HIGH8.1
  • PHP logoPHP
  • backpack/crud
NoYesSep 14, 2026
CVE-2026-54178HIGH8.1
  • PHP logoPHP
  • backpack/crud
NoYesSep 14, 2026
CVE-2026-54180HIGH7.6
  • PHP logoPHP
  • backpack/crud
NoYesSep 14, 2026
CVE-2026-57570MEDIUM6.5
  • PHP logoPHP
  • backpack/crud
NoYesSep 14, 2026
CVE-2026-54181MEDIUM5.4
  • PHP logoPHP
  • backpack/crud
NoYesSep 14, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management