Support Forum Project Downloads FAQ Documentation About Demo Tutorials Blog Plugins
November 21, 2009, 09:54:25 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: cpg1.5.2 beta released
The brand new cpg1.5.x series that comes with a lot of new features finally has reached the release stage: a first public beta release cpg1.5.2 has been released that is mainly aimed at translators, testers and community members that have contributed in the past. The beta release is not meant to be used in a production environment, but only on testbeds and for evaluation purposes. There is currently no support for cpg1.5.x yet!
[more]
   Home   Help Search Board rules Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: [Fixed]: Cross-Site Scripting (XSS) Vulnerability  (Read 7555 times)
0 Members and 1 Guest are viewing this topic.
gsa Topic starter
Coppermine newbie

Romania Romania

Posts: 4


WWW
« on: April 29, 2009, 11:07:00 am »

Hello,
 Accidentally I found one xss in the cpg14x, here you can see the advisory related:

Coppermine Photo Gallery 1.4 Cross-Site Scripting

Author: Gerendi Sandor Attila
Date: April 29, 2009
Package: Coppermine Photo Gallery (cpg14x)
Product homepage: http://coppermine-gallery.net/
Versions Affected: v.1.4 (Other versions may also be affected)
Severity: Medium

Input passed to the 'css' parameter from '/docs/showdoc.php' is not sanitized before it is 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.

Example: http://somehost/docs/showdoc.php?css=1>"><ScRiPt%20%0a%0d>alert(123)%3B</ScRiPt>
« Last Edit: April 30, 2009, 08:44:15 am by Joachim Müller » Logged
Hein Traag
Dev Team member
****
Gender: Male
Netherlands Netherlands

Posts: 2153


A, B, Cpg


WWW
« Reply #1 on: April 29, 2009, 02:53:24 pm »

Thanks for reporting this. On which site did you find this news?
Logged

gsa Topic starter
Coppermine newbie

Romania Romania

Posts: 4


WWW
« Reply #2 on: April 29, 2009, 06:36:31 pm »

I am sorry, I was not very clear In my statement. I am the discoverer of the flaw and the author of the advisory. It was not published anywhere elsewhere. I may publish it after is fixed on my security blog. Sorry again for my bad English, I wanted just to say the I found the vulnerability accidentally.
Logged
gsa Topic starter
Coppermine newbie

Romania Romania

Posts: 4


WWW
« Reply #3 on: April 29, 2009, 06:50:50 pm »

More typo and I can not edit my posts... I am irrecoverable....
Also I wanted to ask for feedback on this bug: reception, acceptation and correction. 
Logged
Phill Luckhurst
Dev Team member
****
Gender: Male
United Kingdom United Kingdom

Posts: 1457


WWW
« Reply #4 on: April 29, 2009, 07:00:00 pm »

I think a little more information will be required so we can see exactly how it works and what it does.

If you would like to PM me full info I will pass it onto the rest of the team so we can take a look and check the impact.

Please also tell us what version of coppermine you are using (should be 1.4.21) along with any other info you can provide.
Logged

It is a mistake to think you can solve any major problems just with potatoes.
Nibbler
Dev Team member
****
Gender: Male
United Kingdom United Kingdom

Posts: 19445



WWW
« Reply #5 on: April 29, 2009, 07:18:15 pm »

That's enough information already. Should be a simple enough fix. Thanks for notifying us.
Logged

I don't care about what they say, I won't live or die that way.
Nibbler
Dev Team member
****
Gender: Male
United Kingdom United Kingdom

Posts: 19445



WWW
« Reply #6 on: April 29, 2009, 07:31:07 pm »

To patch this, edit docs/showdoc.php

find

Code:
$file = str_replace($forbidden_chars, '', $file);

add

Code:
$add_stylesheet = str_replace($forbidden_chars, '', $add_stylesheet);
Logged

I don't care about what they say, I won't live or die that way.
Phill Luckhurst
Dev Team member
****
Gender: Male
United Kingdom United Kingdom

Posts: 1457


WWW
« Reply #7 on: April 29, 2009, 07:46:03 pm »

Yep, it has taken me a while to work out exactly how it does its stuff. I'm a bit slow with these things sometimes.
Logged

It is a mistake to think you can solve any major problems just with potatoes.
Joachim Müller
Administrator
*****
Gender: Male
Germany Germany

Posts: 45051


aka "GauGau"


WWW
« Reply #8 on: April 29, 2009, 09:20:29 pm »

The advisory should be re-worded with correct reference to the versions. Please use this text:
Coppermine Photo Gallery 1.4.21 Cross-Site Scripting

Author: Gerendi Sandor Attila
Date: April 29, 2009
Package: Coppermine Photo Gallery (cpg1.4.21)
Product homepage: http://coppermine-gallery.net/
Versions Affected: v.1.4.21 (older versions are also affected)
Severity: Medium

Input passed to the 'css' parameter from '/docs/showdoc.php' is not sanitized before it is 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.

Example:
Code:
http://somehost/docs/showdoc.php?css=1>"><ScRiPt%20%0a%0d>alert(123)%3B</ScRiPt>

We'll come up with a new version asap.
Logged
gsa Topic starter
Coppermine newbie

Romania Romania

Posts: 4


WWW
« Reply #9 on: April 30, 2009, 08:35:15 am »

The advisory should be re-worded with correct reference to the versions. Please use this text:
We'll come up with a new version asap.

Ok. Thank you.
Logged
Joachim Müller
Administrator
*****
Gender: Male
Germany Germany

Posts: 45051


aka "GauGau"


WWW
« Reply #10 on: April 30, 2009, 08:43:36 am »

cpg1.4.22 has just been released, see announcement thread cpg1.4.22 Security release - upgrade mandatory!.
Manual fixing instructions have been provided in the announcement thread as well. Please keep this thread here clean and do not reply to it with individual issues. If you have issues with upgrading or if you think that you have found another bug, start a thread of your own on the corresponding support board. Do not hijack this thread, which is meant for communication between Gerendi Sandor Attila and the dev team.
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by SMF 1.1.10 | SMF © 2006-2009, Simple Machines LLC
Page created in 0.117 seconds with 15 queries.