But James Lewis, a cybersecurity expert at the Center for Strategic and International Studies in Washington, said he suspected that criminals operating from Eastern Europe acting on their own were responsible. “This doesn’t look like state activity, given the targets that were hit,” he said.

Those targets included corporate computer systems in many other countries — including FedEx in the United States, one of the world’s leading international shippers, as well as Spain’s Telefónica and Russia’s MegaFon telecom giant.

It could take months to find who was behind the attacks — a mystery that may go unsolved. But they alarmed cybersecurity experts everywhere, reflecting the enormous vulnerabilities to internet invasions faced by disjointed networks of computer systems.

There is no automatic way to “patch” their weaknesses around the world.

“When people ask what keeps you up at night, it’s this,” said Chris Camacho, the chief strategy officer at Flashpoint, a New York security firm tracking the attacks. Mr. Camacho said he was particularly disturbed at how the attacks spread like wildfire through corporate, hospital and government networks.

Another security expert, Rohyt Belani, the chief executive of PhishMe, an email security company, said the wormlike capability of the malware was a significant shift from previous ransom attacks. “This is almost like the atom bomb of ransomware,” Mr. Belani said, warning that the attack “may be a sign of things to come.”

The hackers’ weapon of choice on Friday was Wanna Decryptor, a new variant of the WannaCry ransomware, which encrypts victims’ data, locks them out of their systems and demands ransoms.

Researchers said the impact and speed of Friday’s attacks had not been seen in nearly a decade, when the Conficker computer worm infected millions of government, business and personal computers in more than 190 countries, threatening to overpower the computer networks that controlled health care, air traffic and banking systems over the course of several weeks.