The flaw that allowed hackers to deploy the WannaCry cyberattack was discovered by the NSA and was leaked online.