coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 upload => Topic started by: Nookster on April 11, 2008, 09:39:03 AM

Title: Upload Security Issue 1.4.16 and Prior
Post by: Nookster on April 11, 2008, 09:39:03 AM
My website got hacked today; I chased it down to a small PHP script that was named with a .jpg extension and uploaded.  Even though CopperMine won't let you place the file, it still ends up in the album directory.  The path of the album directory can be easily determined by viewing previously uploaded photographs.  This let the attacker execute the PHP script which then appended an iframe onto over 1200 of my web pages that served up a virus to unsuspecting web surfers.

I was running 1.4.12, but I tried the exploit after upgrading to 1.4.16 and it still worked.  Uploads need to go into a directory different from the final viewable directory and not accessible from the web until verified as a valid image file.
Title: Re: Upload Security Issue 1.4.16 and Prior
Post by: Abbas Ali on April 11, 2008, 10:01:42 AM
How can a file with .jpg extension be executed as a PHP script? This can only be done if the server is not configured properly. Not a cpg issue imho.

Perhaps a link to the affected site might help. If you don't want to disclose the link in public then you can PM it to me.
Title: Re: Upload Security Issue 1.4.16 and Prior
Post by: marian on April 11, 2008, 11:13:27 AM
Quote from: Abbas Ali on April 11, 2008, 10:01:42 AM
How can a file with .jpg extension be executed as a PHP script? This can only be done if the server is not configured properly. Not a cpg issue imho.

Perhaps a link to the affected site might help. If you don't want to disclose the link in public then you can PM it to me.
Abbas, I'm pretty sure this is related to the cdpuvbhfzz.com problem. I've taken the liberty of starting a thread in the hope that Nookster and others might be able to help each other, without bothering you people. http://forum.coppermine-gallery.net/index.php/topic,51791.0.html
Ciao
Marian
Title: Re: Upload Security Issue 1.4.16 and Prior
Post by: Abbas Ali on April 11, 2008, 12:52:35 PM
@Marian: It might be.

@Nookster: Can you zip that jpg file and attach it here?
Title: Re: Upload Security Issue 1.4.16 and Prior
Post by: Joachim Müller on April 11, 2008, 06:11:21 PM
Marian: butt out of this thread!