Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 174451 (CVE-2007-2024)

Summary: www-apps/phpwiki script upload vulnerability (CVE-2007-{2024,2025})
Product: Gentoo Security Reporter: Pierre-Yves Rofes (RETIRED) <py>
Component: VulnerabilitiesAssignee: Gentoo Security <security>
Status: RESOLVED FIXED    
Severity: major CC: web-apps
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: http://secunia.com/advisories/24888/
Whiteboard: B1 [glsa] p-y
Package list:
Runtime testing required: ---

Description Pierre-Yves Rofes (RETIRED) gentoo-dev 2007-04-13 13:05:36 UTC
A vulnerability has been discovered in PhpWiki, which can be exploited by malicious people to compromise a vulnerable system.

The "UpLoad" wiki page (index.php/UpLoad) fails to properly validate the extension of an uploaded file. The blacklist of disallowed file extensions does not include for example ".php3" and ".phtml". This can be exploited to upload files with such extensions and execute arbitrary PHP code on the server.

Successful exploitation requires being logged in and that the webserver is configured to execute PHP scripts with such extensions. In the default configuration of PhpWiki, no registration or validation is necessary to log in.

NOTE: The vulnerability is currently being actively exploited.

The vulnerability is confirmed in version 1.3.12p3. Other versions may also be affected.

Solution:
Disable the UpLoad functionality by giving the file "lib/plugin/UpLoad.php" the permissions 000 or by moving the file outside of the web tree.
Comment 1 Pierre-Yves Rofes (RETIRED) gentoo-dev 2007-04-13 13:06:26 UTC
setting status. web-apps, please advise.
Comment 2 Pierre-Yves Rofes (RETIRED) gentoo-dev 2007-04-13 13:21:03 UTC
Hmm no, I was right at first, it's a B1 since ppc had a stable version. sorry for the noise.
Comment 3 Gunnar Wrobel (RETIRED) gentoo-dev 2007-05-10 13:03:17 UTC
There is currently no fixed version available from UPSTREAM. I did proceed as suggested by the advisory and automatically remove the UpLoad.php file during the installation.

Now there is an updated ebuild phpwiki-1.3.10-r3 that contains this fix. It is still marked unstable for ppc. Please test and mark stable on ppc as soon as possible.

I removed two older ebuilds phpwiki-1.3.1{1,2} and added phpwiki-1.3.13_rc1 which will also remove UpLoad.php automatically during install.

Please advise people with a phpwiki installation to immeadiately remove their UpLoad.php file.
Comment 4 Pierre-Yves Rofes (RETIRED) gentoo-dev 2007-05-10 13:19:43 UTC
ppc, please test and mark www-apps/phpwiki-1.3.10-r3 stable.
Comment 5 Tobias Scherbaum (RETIRED) gentoo-dev 2007-05-14 18:35:52 UTC
ppc stable
Comment 6 Pierre-Yves Rofes (RETIRED) gentoo-dev 2007-05-14 18:47:44 UTC
thanks. ready for glsa.
Comment 7 Raphael Marichez (Falco) (RETIRED) gentoo-dev 2007-05-17 13:31:18 UTC
GLSA 200705-16, thanks everybody