The security there is in the type system at compile time, no Trusted Computing shenanigans, and you still avoid buffer overflows and SQL injections (if you use them properly).
Even something as lowly as Python mostly protects you from buffer overflows.
> That is not what either Rust or Haskell are.
Nor even Python.
What I am talking about is that some languages make writing safe code easier, that is code that behaves well as a program when compiled to machine language (or interpreted as is). Especially in the face of hostile inputs.
As an example, it is pretty hard to make your Python interpreter crash with a segfault using just pure Python code. (It is, of course, easy to generate a Python exception.)
Even though, this safety doesn't come at the expense of power: it is easy to tell the interpreter to get out of the way and let you muck around with raw bytes (ie by calling into C).
In the case of Python, the safety-by-default comes at the expense of performance. In the case of Haskell, it is either performance or program complexity. (Ie you can write fast Haskell code, but it looks weird.)
If you do call into something low level, it will be clearly visibly in your code that something potentially dangerous is going on.
Safe and correct behaviour by default is good. Profiling can help you find the few spots where you want to take over safety obligations from the automatic systems in return for extra performance.