Design product: piwio
Developer: piwio project
Affected Versions: 2.3.3 and earlier
Tested version: 2.3.3
Defect type: Directory Path Traversal, Cross-Site Scripting (XSS)
Solution status: officially fixed
Risk Level: Medium
Advisory Details:
High-Tech Bridge SA Security Research Lab has discovered multiple vulnerabilities in piwio, which can be exploited to perform Cross-Site Scripting (XSS) and Path Traversal attacks.
1) directory traversal: CVE-2012-2208
1.1 Input passed via the "language" GET parameter to upgrade. php is vulnerable to directory path traversal. the directory path passed to the "language" parameter is later used in include () function to include the following files: common. lang. php, admin. lang. php, install. lang. php and upgrade. lang. php.
Under certain conditions this can be exploited to include malicious PHP file and execute arbitrary PHP code. to exploit this vulnerability the attacker shocould create a file with the name from the list abve (for example admin. lang. php) in the file system (for example in/tmp/) and try to include it via directory traversal.
The following PoC (Proof Concept) demonstrates the vulnerability:
Http://www.bkjia.com/upgrade. php? Language = ../tmp/
/Tmp/directory shoshould contain "admin. lang. php" file that will be used in include () call.
2) multiple Cross-Site Scripting (XSS): CVE-2012-2209
2.1 Input passed via the "section" GET parameter to admin. php is not properly sanitised before being returned to the user.
This can be exploited to execute arbitrary HTML and script code in administrator's browser session in context of affected website.
The following PoC (Proof Concept) demonstrates the vulnerability:
Http://www.bkjia.com/admin. php? Page = configuration & section = % 22% 3E % 3 Cscript % 3 Eale
Rt % 28document. cookie % 29; % 3C/script % 3E
2.2 Input passed via the "installstatus" GET parameter to admin. php is not properly sanitised before being returned to the user.
This can be exploited to execute arbitrary HTML and script code in administrator's browser session in context of affected website.
The following PoC demonstrates the vulnerability:
Http: // [host]/admin. php? Page = languages_new & installstatus = % 3 Cscript % 3 Eale
Rt % 28document. cookie % 29; % 3C/script % 3E
2.3 Input passed via the "theme" GET parameter to admin. php is not properly sanitised before being returned to the user.
This can be exploited to execute arbitrary HTML and script code in administrator's browser session in context of affected website.
The following PoC demonstrates the vulnerability:
Http: // [host]/admin. php? Page = theme & theme = % 3 Cscript % 3 Ealert % 28document. co
Okie % 29; % 3C/script % 3E
------------------------------------------------------------------------
Solution:
Upgrade to piwio 2.3.4
More Information:
Http://piwigo.org/forum/viewtopic.php? Id = 19173
Http://piwigo.org/releases/2.3.4
Http://piwigo.org/bugs/view.php? Id = 2607