A security issue and a some vulnerabilities have been discovered in PHPhotoalbum, which can be exploited by malicious people to conduct SQL injection attacks or compromise a vulnerable system.
1) Input passed to the "album" parameter in thumbnails.php and "pid" in displayimage.php is not properly sanitised before being used in SQL queries. This can be exploited to manipulate SQL queries by injecting arbitrary SQL code.
2) The security issue is caused due to the application improperly validating uploaded files. This can be exploited to execute arbitrary PHP code by uploading a malicious PHP script with multiple extensions.
Successful exploitation requires that Apache is not configured to handle the mime-type for media files with an e.g. "gif", "jpg", "png" extension.
The security issue and the vulnerabilities are confirmed in version 0.5. Other versions may also be affected.
Solution: Edit the source code to ensure that input is properly sanitised. Restrict access to the upload.php script (via e.g. via .htaccess).
Do you have additional information related to this advisory?
Please provide information about patches, mitigating factors, new versions, exploits, faulty patches, links, and other relevant data by posting comments to this Advisory. You can also send this
information to firstname.lastname@example.org
Subject: PHPhotoalbum SQL Injection and Arbitrary File Upload
No posts yet
You must be logged in to post a comment.
Secunia Customer Login
Not a customer already?
Learn more about how our market leading Vulnerability Management solutions can help you manage risk and ensure compliance.