Code that has been tested and hardened for years? Code that is now being audited and patched quickly with the help of LLMs? Why would I worry more about such a code base than something new and not time tested?
When windows was first widely connected to the Internet security was so terrible Microsoft actually had to pause all work on the next version of windows to fix the current version.
The main problem was not the language itself, but how the OS/Software was initially written and how it evolved gradually with layers of cruft added to maintain backwards compatibility as they went through 16/32/64-bit architectures and different kernels (eg. NT vs. Win95).
It was the complexity and legacy baggage that was the crux of the problem.