Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 84570 - www-apps/xoops: weak file extension validation
Summary: www-apps/xoops: weak file extension validation
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Gentoo Security
URL: http://www.securityfocus.com/archive/...
Whiteboard: ~? [noglsa]
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-08 17:00 UTC by Luke Macken (RETIRED)
Modified: 2005-03-11 20:56 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luke Macken (RETIRED) gentoo-dev 2005-03-08 17:00:17 UTC
Summary: xoops 2.0.9.2 and below weak file extension validation

Description
===========
XOOPS is an extensible, OO (Object Oriented), easy to use dynamic web  
content management system written in PHP. XOOPS is the ideal tool for  
developing small to large dynamic community websites, intra company  
portals, corporate portals, weblogs and much more.

Details
=======
User may upload valid image file with insecure extension through avatar  
upload if "Allow custom avatar upload" is set to "Yes" in "User Info  
Settings". This setting is not on in default installation. This is cause  
of weak file extension validation XoopsMediaUploader class in file  
uploader.php.

         if ( preg_match( '/\.(php|cgi|pl|py|asp)$/i', $this->mediaName ) )  
{
             $this->setErrors('Filename rejected');
             return false;
		}

In some web server installation other extension like .phtml,*.php3 is  
threat as php script.

Workaround
==========
Set "Allow custom avatar upload" to "No" in "User Info Settings".

Proof of concept
================
Rename image to "image.php3" and upload as avatar using "Internet  
Explorer".

Vendor Response
===============
27th February 2005 - Vendor contacted but no response.
Comment 1 Luke Macken (RETIRED) gentoo-dev 2005-03-08 17:01:30 UTC
Official notice

http://www.xoops.org/modules/news/article.php?storyid=2114
Comment 2 Matthias Geerdsen (RETIRED) gentoo-dev 2005-03-10 12:08:53 UTC
Fix seems to be available in upstream CVS and a new release should be out soon.

Seems like one can upload a script with extensions like .php3, which could be interpreted by the web server as an php script. In that case this might be a ~1.
Comment 3 Aaron Walker (RETIRED) gentoo-dev 2005-03-11 07:18:59 UTC
Going to bump to 2.0.9.2 (latest still-vulnerable version) and patch it.  FYI this package isn't stable on any archs.
Comment 4 Aaron Walker (RETIRED) gentoo-dev 2005-03-11 09:43:31 UTC
2.0.9.2 w/patch is in CVS.
Comment 5 Luke Macken (RETIRED) gentoo-dev 2005-03-11 20:56:56 UTC
Thanks Aaron.

This package was never stable; closing without GLSA.