The UK government is one of many major organisations around the world scrambling to remedy a security flaw identified by AI that could be exploited by hackers.