|
|
|
|
|
by tptacek
1303 days ago
|
|
I'm simply going to say this again: Rust's type system doesn't meaningfully mitigate XSS, RCE, or metacharacter injection. You are equally likely to write an SQLI or an SSRF in Rust as you are in Java. There are exactly two types of vulnerabilities Rust (and some other modern memory-safe languages) mitigate beyond memory corruption: 1. Java, Python, and Ruby have deserialization libraries that can easily be misused to create RCE vulnerabilities. 2. Python, Ruby, and Javascript have eval and eval-equivalents (which is essentially what your first example is). You can pretend anything is a type system issue, but neither of these two vulnerabilities are properly understood as type safety errors. Java has a sharply more prescriptive and policed type system than Ruby does, but both have deserialization issues; it's just a generational thing. Deserialization in new Java code is unlikely; deserialization is much less common than SSRF, which plagues Rust code just like everything else. In 2022, there is no meaningful security benefit to Rust over Java. There are other reasons to use Rust! People should just stop making up fake security reasons to do it. |
|