CVE-2013-1469
Description
Directory traversal vulnerability in install.php in Piwigo before 2.4.7 allows remote attackers to read and delete arbitrary files via a .. (dot dot) in the dl parameter.
Predictions
Heuristic predictions, AS-IS, for prioritization only.
Mitigations
No mitigations published for this CVE yet.
The vendor-content worker queues fetches as references arrive (check back in a few minutes). Or โ if you've already worked around this in production โ publish your fix to the community-verified tier.
โ Propose a mitigation on Community โ Mitigations published via the community go through AI scoring + 2 human reviewers + 7-day silent objection window before landing here withsource_tier=community-verified.
Exploits
Public proof-of-concept code below. AS-IS, for defenders and authorised testing only.
Exploit-DB
Piwigo 2.4.6 - '/install.php' Arbitrary File Read/Delete
Piwigo 2.4.6 (install.php) Remote Arbitrary File Read/Delete Vulnerability
Vendor: Piwigo project
Product web page: http://www.piwigo.org
Affected version: 2.4.6
Summary: Piwigo is a photo gallery software for the web that comes
with powerful features to publish and manage your collection of
pictures.
Desc: Input passed to the 'dl' parameter in 'install.php' script
is not properly sanitised before being used to get the contents of
a resource or delete files. This can be exploited to read and delete
arbitrary data from local resources with the permissions of the web
server via directory traversal attack.
====================================================================
/install.php:
-------------
113: if (!empty($_GET['dl']) && file_exists(PHPWG_ROOT_PATH.$conf['data_location'].'pwg_'.$_GET['dl']))
114: {
115: $filename = PHPWG_ROOT_PATH.$conf['data_location'].'pwg_'.$_GET['dl'];
116: header('Cache-Control: no-cache, must-revalidate');
117: header('Pragma: no-cache');
118: header('Content-Disposition: attachment; filename="database.inc.php"');
119: header('Content-Transfer-Encoding: binary');
120: header('Content-Length: '.filesize($filename));
121: echo file_get_contents($filename);
122: unlink($filename);
123: exit();
124: }
====================================================================
Tested on: Microsoft Windows 7 Ultimate SP1 (EN)
Apache 2.4.2 (Win32)
PHP 5.4.4
MySQL 5.5.25a
Vulnerability discovered by Gjoko 'LiquidWorm' Krstic
@zeroscience
Advisory ID: ZSL-2013-5127
Advisory URL: http://www.zeroscience.mk/en/vulnerabilities/ZSL-2013-5127.php
Vendor Patch: http://piwigo.org/bugs/view.php?id=2843
15.02.2013
--
http://localhost/piwigo/install.php?dl=../../../../../../lio_passwords.txt
Piwigo 2.4.6 - Multiple Vulnerabilities
Application impact
| Vendor | Product | Versions | Fixed |
|---|---|---|---|
| piwigo | piwigo | {"endIncluding":"2.4.6"} | |
| piwigo | piwigo | 1.0.0 | |
| piwigo | piwigo | 1.0.1 | |
| piwigo | piwigo | 1.0.2 | |
| piwigo | piwigo | 1.1.0 | |
| piwigo | piwigo | 1.2.0 | |
| piwigo | piwigo | 1.2.1 | |
| piwigo | piwigo | 1.3.0 | |
| piwigo | piwigo | 1.3.1 | |
| piwigo | piwigo | 1.3.2 | |
| piwigo | piwigo | 1.3.3 | |
| piwigo | piwigo | 1.3.4 | |
| piwigo | piwigo | 1.4.0 | |
| piwigo | piwigo | 1.4.1 | |
| piwigo | piwigo | 1.5.0 | |
| piwigo | piwigo | 1.5.1 | |
| piwigo | piwigo | 1.5.2 | |
| piwigo | piwigo | 1.6.0 | |
| piwigo | piwigo | 1.6.1 | |
| piwigo | piwigo | 1.6.2 | |
| piwigo | piwigo | 1.7.0 | |
| piwigo | piwigo | 1.7.1 | |
| piwigo | piwigo | 1.7.2 | |
| piwigo | piwigo | 1.7.3 | |
| piwigo | piwigo | 2.0 | |
| piwigo | piwigo | 2.0.0 | |
| piwigo | piwigo | 2.0.1 | |
| piwigo | piwigo | 2.0.2 | |
| piwigo | piwigo | 2.0.3 | |
| piwigo | piwigo | 2.0.4 | |
| piwigo | piwigo | 2.0.5 | |
| piwigo | piwigo | 2.0.6 | |
| piwigo | piwigo | 2.0.7 | |
| piwigo | piwigo | 2.0.8 | |
| piwigo | piwigo | 2.0.9 | |
| piwigo | piwigo | 2.0.10 | |
| piwigo | piwigo | 2.1.0 | |
| piwigo | piwigo | 2.1.1 | |
| piwigo | piwigo | 2.1.2 | |
| piwigo | piwigo | 2.1.3 | |
| piwigo | piwigo | 2.1.4 | |
| piwigo | piwigo | 2.1.5 | |
| piwigo | piwigo | 2.1.6 | |
| piwigo | piwigo | 2.2.0 | |
| piwigo | piwigo | 2.2.1 | |
| piwigo | piwigo | 2.2.2 | |
| piwigo | piwigo | 2.2.3 | |
| piwigo | piwigo | 2.2.4 | |
| piwigo | piwigo | 2.2.5 | |
| piwigo | piwigo | 2.3.0 | |
| piwigo | piwigo | 2.3.1 | |
| piwigo | piwigo | 2.3.2 | |
| piwigo | piwigo | 2.3.3 | |
| piwigo | piwigo | 2.3.4 | |
| piwigo | piwigo | 2.3.5 | |
| piwigo | piwigo | 2.4.0 | |
| piwigo | piwigo | 2.4.1 | |
| piwigo | piwigo | 2.4.2 | |
| piwigo | piwigo | 2.4.3 | |
| piwigo | piwigo | 2.4.4 | |
| piwigo | piwigo | 2.4.5 | |
References
- http://archives.neohapsis.com/archives/bugtraq/2013-02/0153.html
- http://packetstormsecurity.com/files/120592/Piwigo-2.4.6-Cross-Site-Request-Forgery-Traversal.html
- http://piwigo.org/bugs/view.php?id=0002843
- http://piwigo.org/forum/viewtopic.php?id=21470
- http://piwigo.org/releases/2.4.7
- http://www.exploit-db.com/exploits/24561
- http://www.zeroscience.mk/en/vulnerabilities/ZSL-2013-5127.php
- https://www.htbridge.com/advisory/HTB23144
- http://archives.neohapsis.com/archives/bugtraq/2013-02/0153.html
- http://packetstormsecurity.com/files/120592/Piwigo-2.4.6-Cross-Site-Request-Forgery-Traversal.html
- http://piwigo.org/bugs/view.php?id=0002843
- http://piwigo.org/forum/viewtopic.php?id=21470
- http://piwigo.org/releases/2.4.7
- http://www.exploit-db.com/exploits/24561
- http://www.zeroscience.mk/en/vulnerabilities/ZSL-2013-5127.php
- https://www.htbridge.com/advisory/HTB23144
CWEs
CWE-22
Community-verified mitigations for this CVE will appear above when contributors publish them.
Verify integrity in audit chain (admin only). AS-IS.