Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 212368 - www-apps/net2ftp security status
Summary: www-apps/net2ftp security status
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo Security
URL: http://cve.mitre.org/cgi-bin/cvename....
Whiteboard: B4 [noglsa]
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-05 11:09 UTC by Jakub Moc (RETIRED)
Modified: 2009-09-14 22:09 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 Jakub Moc (RETIRED) gentoo-dev 2008-03-05 11:09:48 UTC
Secunia Advisory:   	 SA22255  	  
Release Date: 	2006-10-03

Critical: 	
Less critical
Impact: 	Cross Site Scripting
Where: 	From remote
Solution Status: 	Unpatched

Software:	net2ftp 0.x

	This advisory is currently marked as unpatched!
- Companies can be alerted when a patch is released!


Description:
securfrog has discovered a vulnerability in net2ftp, which can be exploited by malicious people to conduct cross-site scripting attacks.

Input passed to the "username" parameter in index.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 an affected site.

The vulnerability has been confirmed in version 0.93. Other versions may also be affected.

Solution:
Edit the source code to ensure that input is properly sanitised.

Provided and/or discovered by:
securfrog
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2008-03-05 11:25:11 UTC
Quickly looking at 0.96, it still fails to perform any sanitization on username values, beyond the below funky comment suggesting upstream is clueless...

<snip>
function validateUsername($username) {

// --------------
// This function validates the username
// --------------

// Remove invisible characters in the beginning and at the end
        $username = trim($username);

// Remove XSS code
//      $username = RemoveXSS($username);

        return $username;

} // end validateUsername
</snip>

The password handling also looks "optimistic" :P

<snip>
function validatePassword($password) {

// --------------
// This function validates the plain password
// --------------

// Remove invisible characters in the beginning and at the end
        $password = trim($password);

// Remove XSS code
//      $password = RemoveXSS($password);

        return $password;

} // end validatePassword
Comment 2 Robert Buchholz (RETIRED) gentoo-dev 2008-03-05 11:29:20 UTC
See http://www.securityfocus.com/archive/1/archive/1/447535/100/0/threaded for the original advisory.
Comment 3 Benedikt Böhm (RETIRED) gentoo-dev 2008-03-07 10:59:55 UTC
oh boy ... masked
Comment 4 Techwolf 2008-03-30 20:06:52 UTC
This security bug was reported in 2006 and its is now 2008.
The securityfocus tread shows securfrog being debunked pretty hard.
The forums on net2ftp site has an old thread dealing with the issue basically saying the bug is on very old version, more then three years ago from the post date.
http://www.net2ftp.org/forums/viewtopic.php?id=2267
http://nvd.nist.gov/nvd.cfm?cvename=CVE-2006-5097 also disputes this vulnerability.
This "bug" has been in the wild for three years but there are no exploits using it that I am aware of.
Masking it was a bit of knee jerk rush. Please reevaluate the masking.
Comment 5 Benedikt Böhm (RETIRED) gentoo-dev 2008-04-03 08:35:50 UTC
well, alone the above snippet of user/password "validation" makes any security aware person go sick. you can still unmask if you feel like it
Comment 6 Patrizio Bassi 2008-05-27 18:26:40 UTC
0.96 and 0.97 out....
Comment 7 Tobias Heinlein (RETIRED) gentoo-dev 2008-05-27 20:43:37 UTC
(In reply to comment #6)
> 0.96 and 0.97 out....

I just had a look at 0.97 and the snippet from comment #1 doesn't seem to have changed..

Comment 8 Pierre-Yves Rofes (RETIRED) gentoo-dev 2008-07-09 21:17:00 UTC
more issues with net2ftp...

http://secunia.com/advisories/30611/
Comment 9 Robert Buchholz (RETIRED) gentoo-dev 2008-08-17 23:43:07 UTC
mailed upstream
Comment 10 Robert Buchholz (RETIRED) gentoo-dev 2008-08-18 00:13:54 UTC
... without succes:
<mailbox2@ibelgique.com>: host mailrecv.ifrance.com[82.196.5.130] said: 550
    <mailbox2@ibelgique.com>: Recipient address rejected: User unknown in local
    recipient table (in reply to RCPT TO command)
Comment 11 Gunnar Wrobel (RETIRED) gentoo-dev 2008-10-31 06:20:36 UTC
issued last rites. will be removed in 30 days.
Comment 12 Techwolf 2008-11-04 02:28:24 UTC
(In reply to comment #5)
> well, alone the above snippet of user/password "validation" makes any security
> aware person go sick. you can still unmask if you feel like it
> 

Please explain what is wrong with it? We are not all elite security experts. Should they be replace with library function that does proper sanitizing? If so, I could have a php script writer look into it. 
Comment 13 Gunnar Wrobel (RETIRED) gentoo-dev 2008-12-03 10:46:31 UTC
Ebuild removed. webapps done.
Comment 14 Alex Legler (RETIRED) archtester gentoo-dev Security 2009-08-27 22:16:17 UTC
Also, 10 months later... GLSA?
Comment 15 Stefan Behte (RETIRED) gentoo-dev Security 2009-09-14 22:09:27 UTC
It's just XSS, my vote is NO, the bug is extremely old, closing noglsa.