Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Security Breach?  (Read 3084 times)

0 Members and 1 Guest are viewing this topic.

qwaven

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 41
Security Breach?
« on: February 06, 2007, 04:52:57 am »

Hello,

A friend of mine showed me this video called "Local JPG shell Inclusion (LFI using php injected JPG)". So I am wondering if this is a) possible to do through coppermine and b) if so is there a way to prevent this? Such as disallow code execution from anything other than php files (not dont allow them to upload them).

See video here: http://milw0rm.org/video/watch.php?id=57
Website home page (in case link does not work): http://milw0rm.org

Please get back to me,
Thanks
« Last Edit: February 12, 2007, 07:44:37 am by GauGau »
Logged

qwaven

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 41
Re: Security Breach?
« Reply #1 on: February 06, 2007, 04:57:24 am »

Sorry typo!!!

This: Such as disallow code execution from anything other than php files (not dont allow them to upload them).

What meant to read:

Such as disallow code execution from anything other than php files (Dont allow them to upload them).
Logged

qwaven

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 41
Re: Security Breach?
« Reply #2 on: February 09, 2007, 08:50:25 am »

No one has anything for me?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Security Breach?
« Reply #3 on: February 09, 2007, 09:01:55 am »

This is a matter of webserver setup, not an issue related to coppermine. The webserver should be set up to only parse files that are actually specified by extension. There is a flaw (or unproperly documented feature) of the Apache webserver that allows files with unknown extension to be parsed by the PHP interpreter. Subsequently, a file named some_evil_script.php.foo could contain malevolent PHP code and get executed if it gets on the server. Therefor, an app that allows uploads (like Coppermine) has to make sure that only valid files can get uploaded. This is being accomplished in Coppermine by renaming all dots but the last one in a file name with underscores during upload (the file in above example gets renamed to some_evil_script_php.foo), so no harm is being done. However, this is not related to the flaw you refered to in the first place. Not sure what to recommend. As I suggested above: it's a webserver issue, not a Coppermine issue.
Logged

qwaven

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 41
Re: Security Breach?
« Reply #4 on: February 10, 2007, 12:41:40 am »

Hmm I was thinking since the code would be originally executed/sent from coppermine since the 'abuser' would upload an image, and than click on the uploaded image to execute it. I was thinking that there would be something like 'do not pass *.jpg to php' ...

Anyway I'm sure you know more about this than I do. I was just trying to bring it to your attention in case it was something that could be fixed on your end.

Anyway as always keep up the great work!

Thank you for the reply :)
Logged

Nibbler

  • Guest
Re: Security Breach?
« Reply #5 on: February 10, 2007, 12:56:17 am »

When your web browser requests an image that has been uploaded to the gallery Coppermine is not involved in any way. The webserver should be configured to not treat the image as php code any more than code in a plain text document.
Logged

qwaven

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 41
Re: Security Breach?
« Reply #6 on: February 12, 2007, 12:42:43 am »

Hmm ok well thanks for the information :)
Logged
Pages: [1]   Go Up
 

Page created in 0.016 seconds with 15 queries.