in reply to Any security holes?
Oh, among other issues, there are security concerns with this code.
- First, the handling of @pairs and $buffer seems to be a leftover from some pre-CGI variation, the %FORM hash is not used in the rest of the code.
- Your code is just appending stuff to the drivers.html file, so this file will probably never be correct HTML - the closing elements are missing.
- As already written by LanX: You accept anything your script gets as parameters and write it to the file. As a harmless example, let a user provide nick=<div style="display:none">. Whatever this user, and all subsequent users, add to the file, will be invisible - until another request happens to close the div element. This is called HTML injection.
- If said script ends with reloading the same page again, then your users are in an endless loop and sooner or later your web server will break.
You should be aware that the URL leading to your script doesn't need to be called by a browser. A malicious user could easily use LWP::UserAgent or a similar module to feed any complicated stuff into your script.
And yes, all these things have happened a lot of times. The OWASP top ten always lists "Injection" as a prominent security risk.
As a minimum security guard you should prevent user-provided HTML from being processed by the browser by using HTML::Entities or HTML::Escape to encode unsafe characters.
In Section Seekers of Perl Wisdom