Update: Microsoft has issued a security patch to address the vulnerability exploited by the ransomware attack. The patch (MS17-010) addresses how Microsoft Server Message Block 1.0 (SMBv1) servers handle specific requests that allow remote code execution on compromised systesms.

http://www.ibtimes.com/telefonica-wannacry-ransomware-one-spains-largest-telecom-companies-hit-cyberattack-2538211