Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 244741 (CVE-2008-5905) - net-p2p/ktorrent <2.2.8 web interface plugin vulnerable to PHP injection (CVE-2008-{5905,5906})
Summary: net-p2p/ktorrent <2.2.8 web interface plugin vulnerable to PHP injection (CVE...
Status: RESOLVED FIXED
Alias: CVE-2008-5905
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Gentoo Security
URL: http://secunia.com/advisories/32442/
Whiteboard: C1 [glsa]
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-28 11:31 UTC by eleanor
Modified: 2009-02-23 21:49 UTC (History)
5 users (show)

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


Attachments
ktorrent-3.1.3-upload.patch (ktorrent-3.1.3-upload.patch,734 bytes, text/plain)
2008-10-28 14:59 UTC, Robert Buchholz (RETIRED)
no flags Details
ktorrent-3.1.3-php-injection.patch (ktorrent-3.1.3-php-injection.patch,1.21 KB, text/plain)
2008-10-28 14:59 UTC, Robert Buchholz (RETIRED)
no flags Details
ktorrent-2.2.7-upload.patch (ktorrent-2.2.7-upload.patch,826 bytes, text/plain)
2008-10-28 15:00 UTC, Robert Buchholz (RETIRED)
no flags Details
ktorrent-2.2.7-php-injection.patch (ktorrent-2.2.7-php-injection.patch,1.33 KB, text/plain)
2008-10-28 15:00 UTC, Robert Buchholz (RETIRED)
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description eleanor 2008-10-28 11:31:34 UTC
Some vulnerabilities have been discovered in KTorrent, which can be exploited by malicious users to compromise a vulnerable system and malicious people to bypass certain security restrictions.

1) The web interface plugin does not properly restrict access to the torrent upload functionality. This can be exploited to upload arbitrary torrent files by sending specially crafted HTTP POST request to the affected application.

2) The web interface plugin does not properly sanitise request parameters before passing them to the PHP interpreter. This can be exploited to inject and execute arbitrary PHP code by passing specially crafted parameters to the PHP scripts of the web interface.

Successful exploitation of the vulnerabilities requires that the web interface plugin is enabled (not the default setting).

The vulnerabilities are confirmed in version 3.1.3. Prior versions may also be affected.

Reproducible: Always




Not a very good solution: update to version 3.1.4.
Comment 1 Stefan Behte (RETIRED) gentoo-dev Security 2008-10-28 12:54:26 UTC
http://secunia.com/advisories/32442/
We have 3.1.4 in the tree, the advisory says only 3.x is vulnerable.
Topic and whiteboard should be changed accordingly.
Maintainers: Can we remove the vulnerable version 3.1.3?

Unfortunately, I don't have edit rights.
Comment 2 Robert Buchholz (RETIRED) gentoo-dev 2008-10-28 14:58:46 UTC
Note that the 2.x version of ktorrent is also affected for both issues (file upload, and php command execution).

The upload issue can be exploited by unauthorized users to start downloads/seeding for a given torrent. I could not exploit the second issue to execute code when not authorized to the system.
Comment 3 Robert Buchholz (RETIRED) gentoo-dev 2008-10-28 14:59:32 UTC
Created attachment 170106 [details]
ktorrent-3.1.3-upload.patch

Upstream 3.1.4 patch for issue (1).
Comment 4 Robert Buchholz (RETIRED) gentoo-dev 2008-10-28 14:59:47 UTC
Created attachment 170108 [details]
ktorrent-3.1.3-php-injection.patch

Upstream 3.1.4 patch for issue (2).
Comment 5 Robert Buchholz (RETIRED) gentoo-dev 2008-10-28 15:00:07 UTC
Created attachment 170109 [details]
ktorrent-2.2.7-upload.patch

Backported 2.2.7 patch for issue (1).
Comment 6 Robert Buchholz (RETIRED) gentoo-dev 2008-10-28 15:00:27 UTC
Created attachment 170111 [details]
ktorrent-2.2.7-php-injection.patch

Backported 2.2.7 patch for issue (2).
Comment 7 juantxorena@gmail.com 2008-11-02 10:55:59 UTC
FYI, a 2.2.8 version has been released today to fix this problem.
Comment 8 Robert Buchholz (RETIRED) gentoo-dev 2008-11-02 12:25:26 UTC
net-p2p, please bump
Comment 9 Robert Buchholz (RETIRED) gentoo-dev 2008-11-27 19:05:20 UTC
ping
Comment 10 Tomáš Chvátal (RETIRED) gentoo-dev 2008-11-28 11:50:19 UTC
Ok now you can CC archies so they stable 2.2.8 asap and remove 2.2.7.
Comment 11 Robert Buchholz (RETIRED) gentoo-dev 2008-11-28 15:51:15 UTC
Arches, please test and mark stable:
=net-p2p/ktorrent-2.2.8
Target keywords : "amd64 ppc ppc64 sparc x86"
Comment 12 Markus Meier gentoo-dev 2008-11-28 20:19:37 UTC
amd64/x86 stable
Comment 13 Tobias Scherbaum (RETIRED) gentoo-dev 2008-11-28 21:56:18 UTC
ppc stable
Comment 14 Friedrich Oslage (RETIRED) gentoo-dev 2008-12-01 22:09:36 UTC
sparc stable
Comment 15 Stefan Behte (RETIRED) gentoo-dev Security 2009-01-05 22:57:45 UTC
pp64: *ping*
Comment 16 Brent Baude (RETIRED) gentoo-dev 2009-01-06 02:48:02 UTC
ppc64 done
Comment 17 Tomáš Chvátal (RETIRED) gentoo-dev 2009-01-06 15:36:04 UTC
Looks like all archies done, so closing.
Thanks for cooperation :]
Comment 18 Christian Hoffmann (RETIRED) gentoo-dev 2009-01-06 16:13:34 UTC
Please don't simply close security bugs.
C1, if it proves to be correct, requires a GLSA.
Comment 19 Tobias Heinlein (RETIRED) gentoo-dev 2009-01-06 19:59:17 UTC
Thank you, Christian.

... and I vote YES.
Comment 20 Tobias Heinlein (RETIRED) gentoo-dev 2009-01-06 20:05:52 UTC
C1 is correct in my view. This is major severity and needs a GLSA. Request filed.
Comment 21 Pierre-Yves Rofes (RETIRED) gentoo-dev 2009-02-23 21:49:10 UTC
GLSA 200902-05, sorry for the delay.