Hi, Mats...

On Sonntag, 6. Juli 2008, Mats wrote:
> I just installed Pylons and found the ability to execute python
> commands within the traceback pretty cool.
>
> Unfortunately I'm concerned that this could be a major security
> vulnerability. I was expecting that there might be some restriction on
> which machines can access the server, e.g. only to accept HTTP
> requests from localhost. I asked a friend to check from his computer
> and this was not the case: I was giving shell access to my machine to
> the entire web!
>
> It seems that some bright hacker or hacker network could look for
> computers with port 5000 open and attempt to make an HTTP request for
> a non-existent page, and if it's running Pylons then the script could
> automatically insert very nasty code into the traceback from the 404-
> like error message...
>
> ( Yes, the development.ini file says that we should enable the
> debug=False option for production, but in my humble opinion 1) that
> message seems rather hidden (as opposed to an explicit warning yes/no
> prompt the first time one runs "paster --serve development.ini"), and
> 2) it seems to imply that running with debug=True as the default state
> is fine when you're new to Pylons and just wish to test this out of
> the box. )

The warning about the debug mode isn't that hard to find. The senior chief 
deployment officer is supposed to customize the INI file anyway because 
that's what controls the behavior of the deployed application. You can't 
really blame the developer of the software if their users don't read the 
documentation.

Pylons is lead developed in the USA but I hope that doesn't meant that we 
others need all these security stickers like telling that microwaves 
aren't suited well for drying cats and that you should remove the 
sunscreen from your car before driving.

The warning is there. And the paste_deploy_config.ini_tmpl (the template 
that is used to create INI files when you deploy the application) has set 
debug to False. So almost everybody should be safe. And the others deserve 
to get hacked. :)

Cheers
 Christoph
-- 
When you do things right people won't be sure you've done anything at all.

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to