Microsoft on Sunday said a software vulnerability stolen from the U.S. National Security Agency has affected customers around the world, and described the spread of the WannaCry/WannaCrypt ransomware on Friday in many countries as yet another example of the problems caused by the stockpiling of vulnerabilities by governments.

Referring to the attack as a “wake-up call,” Microsoft’s President and Chief Legal Officer, Brad Smith wrote in a blog post that governments have “to consider the damage to civilians that comes from hoarding these vulnerabilities and the use of these exploits.”

The ransomware, also called WannaCry or Wana Decryptor, works by exploiting a vulnerability in some older versions of Windows. It has been suspected for some time now that the malware came from a cache of hacking tools reportedly stolen by hacking group Shadow Brokers from the NSA and leaked on the internet. WannaCry is said to take advantage of a NSA hacking tool, called EternalBlue, that can make it easy to hijack unpatched older Windows machines.

Microsoft is now confirming that the WannaCrypt exploits used in the attack on Friday were drawn from the trove of exploits stolen from the NSA. “Until this weekend’s attack, Microsoft declined to officially confirm this, as US Gov refused to confirm or deny this was their exploit,” wrote NSA whistleblower Edward Snowden in a tweet.

On March 14, the company had released a security update to patch the vulnerability. “While this protected newer Windows systems and computers that had enabled Windows Update to apply this latest update, many computers remained unpatched globally,” Smith wrote. “As a result, hospitals, businesses, governments, and computers at homes were affected.”

On Friday a number of agencies and businesses around the globe, including the U.K.’s National Health Service, were disrupted by the malware, which is estimated to have hit over 100,000 organizations in 150 countries, Rob Wainwright, executive director of Europol, the European law enforcement agency, told ITV.

Microsoft rolled out over the weekend a patch for Windows XP, Windows Server 2003 and Windows 8, which are operating systems for which it no longer provides mainstream support.

There are apprehensions that a second wave of the attack may arrive Monday as employees return and switch on affected computers. The attackers could also hit back with a variant of the malware that does not have a provision for the “kill switch” found by a researcher to stem the first round of attacks. “Version 1 of WannaCrypt was stoppable but version 2.0 will likely remove the flaw. You’re only safe if you patch ASAP,” wrote the researcher on Twitter.

Microsoft called in February for a “Digital Geneva Convention” laying down the rules for the protection of users from state cyber attacks, including a requirement for governments to report vulnerabilities to vendors, rather than stockpile, sell, or exploit them. “We have seen vulnerabilities stored by the CIA show up on WikiLeaks, and now this vulnerability stolen from the NSA has affected customers around the world,” Smith wrote.

Exploits in the hands of governments have repeatedly leaked into the public domain and caused widespread damage, wrote Smith, who compared the leaks of CIA and NSA vulnerabilities to the U.S. military having some of its Tomahawk missiles stolen. “This most recent attack represents a completely unintended but disconcerting link between the two most serious forms of cybersecurity threats in the world today – nation-state action and organized criminal action,” he added.