Python CGI security

Michael Ströder michael at stroeder.com
Mon Jul 3 07:33:54 EDT 2000


Moshe Zadka wrote:
> 
> On Mon, 3 Jul 2000, Michael [iso-8859-1] Ströder wrote:
> 
> > Ok, here are some examples from Python1.6a2 sources (see below).
> 
> OK, here is an answer to the report I just snipped.

Note that I only posted *excerpts* of the ITS4 output. Feel free to
ask if you want the whole output by e-mail (approx. 1000 lines with
a lot of repeated messages).

> There are a few types of "potential security holes":
> 
>  -- exposing insecure parts of the API, such as os.system(). These should
>     stay, since the user should have those at his disposale

Would it be possible to provide a secure version in the Python lib
of e.g. os.system() with same function parameters but less unsecure
behaviour instead of just wrapping it 1:1?

>  -- OS/2 message formatting. I haven't looked at it, but this only
>     concerns you if you're working on OS/2

Hmm, I do not know under which OS my demons will run.
Would be worth to collect such insights somewhere.

>  -- checked "dangerous" functions, which are therefore fine as far as I
>     could see
> 
>  -- one sprintf() which will work fine as long as integers are <128 bits,
>     which is true in the forseeable feature. I'm planning to patch this,
>     just in case, but it should be fine anyway. (I'm talking about the
>     first sprintf() in posixmodule.c)

Thanks for following up.

Ciao, Michael.



More information about the Python-list mailing list