It is inherent risk and it is present everywhere. Just because there are bugs every now and then doesn’t mean there is a crash and you should also know that Linux was almost screwed by a backdoor that XZ Utils had, it doesn’t save open source.
The only thing you can do is to reduce it and if you don’t take precautions you will increase that risk.