This is why you need strict quality control whenever you have AI making things.
Cybersecurity experts need to thoroughly examine all the code and how the software works...or doesn't work and help fix it
Then you need ethical hackers to test the security and you need the cybersecurity experts to fix the problems the ethical hackers find.
it's boring, grueling work but if you don't do it everything falls apart