TorrentFlux.com Welcome, Guest. Please login or register.
03-20-2010, 17:10:09
Home Help Search Login Register donate
TorrentFlux Home | TorrentFlux Hosting

+  TorrentFlux Forums
|-+  TorrentFlux Support
| |-+  Linux Installations Support
| | |-+  TorrentFlux User-Agent XSS Vulnerability
« previous next »
Pages: [1] Go Down Print
Author Topic: TorrentFlux User-Agent XSS Vulnerability  (Read 3026 times)
mnb93
Newbie
*
Offline Offline

TF Base: Linux 2.x
Posts: 6



View Profile
« on: 10-05-2006, 20:32:43 »

http://www.stevenroddis.com.au/2006/10/06/torrentflux-user-agent-xss-vulnerability/

Name: TorrentFlux User-Agent XSS Vulnerability
Published: 2006-10-06
Critical Level: Moderate
Type: Cross-Site Scripting
Where: Remote
Status: 0-Day
Software: Torrentflux 2.1
Discoverer: Steven Roddis (http://www.stevenroddis.com.au)

I gave the authors of this product a week (more than usual) just to contact me, they have failed to do so; so I am releasing this vulnerability publicly!

/admin.php

Line: 325

$ip_info = $ip_resolved.”
“.$user_agent;

Useragent is not esacped.

Solution:

Edit source code:

/admin.php

Line: 325:

$ip_info = htmlentities($ip_resolved, ENT_QUOTES)."
".htmlentities($user_agent, ENT_QUOTES);
« Last Edit: 10-07-2006, 02:16:02 by mnb93 » Logged
Qrome
Administrator
Hero Member
*****
Offline Offline

TF Base: Linux 2.x
Posts: 2783


TorrentFlux.com





View Profile
« Reply #1 on: 10-05-2006, 21:35:26 »

There was no contact to me the author.
Logged

Check out the new FireFox Extension by IceWind for TorrentFlux called TorrentFlux Add -- right click on torrents and have them added to your TorrentFlux list.
mnb93
Newbie
*
Offline Offline

TF Base: Linux 2.x
Posts: 6



View Profile
« Reply #2 on: 10-05-2006, 22:10:48 »

I used this form: http://www.torrentflux.com/contact.php
Logged
mnb93
Newbie
*
Offline Offline

TF Base: Linux 2.x
Posts: 6



View Profile
« Reply #3 on: 10-06-2006, 04:23:16 »

Line: 325:

$ip_info = htmlentities($ip_resolved, ENT_QUOTES)."
".htmlentities($user_agent, ENT_QUOTES);
« Last Edit: 10-07-2006, 02:15:43 by mnb93 » Logged
mnb93
Newbie
*
Offline Offline

TF Base: Linux 2.x
Posts: 6



View Profile
« Reply #4 on: 10-10-2006, 01:03:44 »

Are you going to fix it?
If you need help, please contact me.
Logged
IhatemyISP
Forum Code Monkey
Hero Member
*****
Offline Offline

TF Base: Linux 2.x
Posts: 841






View Profile WWW
« Reply #5 on: 10-10-2006, 03:23:10 »

It will be taken care of.
Logged

Pentium III 667mhz | 155GB RAID 0 | 256MB RAM | Redhat 7.3 - 2.4.18-3 | Python 2.4.1 | PHP 5.1.4 (cgi-fcgi) | Lighttpd 1.4.11
Qrome
Administrator
Hero Member
*****
Offline Offline

TF Base: Linux 2.x
Posts: 2783


TorrentFlux.com





View Profile
« Reply #6 on: 10-16-2006, 12:59:23 »

The real fix for this is to edit the following in the settingsfunctions.php:

Line 33:
Code:
    return htmlentities(trim($_REQUEST[$varName]), ENT_QUOTES);

Lines 51-59:
Code:
    $rec = array(
                    'user_id' => $cfg['user'],
                    'file' => $file,
                    'action' => $action,
                    'ip' => htmlentities($cfg['ip'], ENT_QUOTES),
                    'ip_resolved' => htmlentities($host_resolved, ENT_QUOTES),
                    'user_agent' => htmlentities($_SERVER['HTTP_USER_AGENT'], ENT_QUOTES),
                    'time' => $create_time
                );

By doing this, all the request/get vars will be scrubed as well as any logging of user-agents and IP addresses reported by the visitor.

We are planning a TF 2.1.1 release very soon.
Logged

Check out the new FireFox Extension by IceWind for TorrentFlux called TorrentFlux Add -- right click on torrents and have them added to your TorrentFlux list.
Qrome
Administrator
Hero Member
*****
Offline Offline

TF Base: Linux 2.x
Posts: 2783


TorrentFlux.com





View Profile
« Reply #7 on: 10-17-2006, 00:44:22 »

TorrentFlux 2.2 is available for testing with the Supporting Members:

http://www.torrentflux.com/forum/index.php/topic,2082.0.html

We hope to have it released this week.
Logged

Check out the new FireFox Extension by IceWind for TorrentFlux called TorrentFlux Add -- right click on torrents and have them added to your TorrentFlux list.
Pages: [1] Go Up Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by SMF 1.1.1 | SMF © 2006, Simple Machines LLC Powered by PHP