The Prime Minister said the ransomware hit was “not targeted” at the health service but was part of a wider assault on organisations across a number of countries.
The National Cyber Security Centre (NCSC) is working to support the NHS.
Mrs May said: “We are aware that a number of NHS organisations have reported that they have suffered from a ransomware attack.
“This is not targeted at the NHS, it’s an international attack and a number of countries and organisations have been affected.
“The National Cyber Security Centre is working closely with NHS digital to ensure that they support the organisations concerned and that they protect patient safety.
“And, we are not aware of any evidence that patient data has been compromised.
“Of course it is important that we have set up the National Cyber Security Centre and they are able to work with the NHS organisations concerned and to ensure that they are supported and patient safety is protected.”