It doesn't have anything like `eval` and is much less tolerant of weird input by default than dynamically typed languages (at least in my experience). Having no or limited state also helps--bad input and other mistakes tend to be more localized when they can't possibly change anything else in the program.
If you're really crazy about security, then I suspect the Haskell code would also be much easier to analyze and verify.
Of course, since such checking is used when the number of possible inputs is too large to check (or infinite), it is not watertight. But it helps tremendously in uncovering bugs.
The implementation may still have bugs, I suppose, but you can be sure that it's at least being heavily thought about.
I imagine forms may work the same way, though I'm not sure about that.
[1] http://www.yesodweb.com/home/snoyberg/blogs/2011/08/shakespe...
Security holes don't just magically go away when software gets popular. You should be striving to not create security holes in the first place.