Is Perl's taint mode useful?

Juanjo Conti picture Juanjo Conti · Feb 9, 2010 · Viewed 7.4k times · Source
perl -T

Do you use it? Does it help you finding security holes in your Perl scripts?

Answer

ziya picture ziya · Feb 9, 2010

More than that :) it stops your security issues before they become one. It is not a security silver bullet of course... we used to use it (a few years back when I was involved in Perl projects) in any script that was exposed externally (i.e. any mod_perl app) and we found it very useful and made it our policy. It does a few checks and it is handy.. (anything makes things automated)

Perl Security - perlsec recommends it strongly too:

This flag [Taint mode] is strongly suggested for server programs and any program run on behalf of someone else, such as a CGI script. Once taint mode is on, it's on for the remainder of your script.