Recently on the CGI beginners mailing list (see http://learn.perl.org), one Gunther Birznieks posted a message regarding a talk he gave at ApacheCon about CGI security. He posted a link to the slides used in the talk. The slides are at best a brief overview of the many issues involved, but do an excellent job of giving a background on some CGI security issues. What I found particularly pleasant about the slides is that he is quite candid about the security holes present in some of Selena Sol's earlier code (which he apparently also worked on). From his email:

Since me and Selena Sol have been around giving out open source web apps since 8 years ago (very early on the Web), we've of course seen the gamut of security holes, including those within our own past software.

So this talk was really an attempt (within a tiny 45 minute talk) of going through common problems from a long time ago and linking them up to problems that are more recent and have gotten little publicity but 2 years down the road may be as "rote" as knowing that filenames need to be filtered.

There's actually quite a bit of interesting stuff out there that has really only been "discovered" and publicized at all in the last year or two. Null byte is another huge issue few Perl programmers seem to know about/understand as it affects the file open() command in a subtle way yet I think it is not described in perldoc perlsec (it seems mostly focused on tainting and general validation issues).

As you can see from his comments, reading perldoc perlsec and then reading through his slides (and the URLs that he includes for more information) can give a programmer an excellent introduction to many CGI security issues.

++ to Selena Sol and Gunther Birznieks for being so forthright about these issues and attempting to further educate the Perl community about these problems.

Cheers,
Ovid

Vote for paco!

Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.


In reply to CGI Security and Selena Sol by Ovid

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.