The WannaCry ransomware attack that crippled computers across the globe exploited a vulnerability that Microsoft had patched well in advance, but countless users failed to update their systems in time.