X2Engine <= 3.7.5 (ProfileController.php) Unrestricted File Upload Vulnerability
The ProfileController.php script in X2Engine 3.7.5 allows unrestricted file uploads through the actionUploadPhoto() method. An attacker could upload a malicious PHP script and execute arbitrary PHP code on the server.
karmainsecurity.com
Published on karmainsecurity.com
The vulnerability exists in the /protected/controllers/ProfileController.php script, specifically in the actionUploadPhoto() method, allowing to upload arbitrary files. This can be exploited to execute arbitrary PHP code by uploading a malicious PHP script.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the actionUploadPhoto() method does not validate the file type or extension before saving uploaded files.
Impact
An attacker could execute arbitrary PHP code on the server, potentially leading to full compromise.
What the attacker needed
Access to the photo upload feature
The fix
The vendor released a patch and version 4.0 fixes the issue.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
This report describes a flaw in a web application that lets someone upload any file type, including a PHP script. If the server runs that script, the attacker can take control of the server. The fix is to update the software to a patched version.
What is File upload?
An upload feature accepts a file that the server or other users' browsers then treat as code or as something trusted.