Re: changing languages isn't going to fix this.
Rust stops entire classes of problem that C/C++ doesn't care about.
For example C/C++ doesn't care if you forget to protect some shared data. Rust does and won't even compile until you do. C/C++ doesn't care if you call a NULL pointer, Rust doesn't even have pointers in safe mode, and won't let you call a reference either unless lifetime guarantees are satisfied. C/C++ doesn't care if you write off the end of a buffer, Rust will panic and bring your program down with a stack trace.
Most CVEs are for these things - NPEs, buffer overflows, corruption, data races. All gone just by using a more stringently checked language.