Information that could allow anyone to log-in to more than 100 email accounts at embassies and government agencies around the world has been leaked online.
The data, which has been posted online by freelance security consultant Dan Egerstad, reveals usernames, passwords and server addresses.
Those affected include Kazakhstan's embassies in the US and Russia, India's embassy in the US and Russia's embassy in Sweden.
The information also includes Indian and Russian log-in details for email accounts at the UK visa office in Nepal, the foreign ministry of Iran and 40 Uzbeki embassies around the world.
"I did an experiment and came across the information by accident," Egerstad told Computer Sweden.
The security consultant claimed that he had not accessed any of the compromised accounts because he did not want to break the law.
However, he defended his decision to post the information online rather than warning the affected parties.
"When something like this happens you usually contact people and ask them to fix it, but in this case it felt too big for that, calling to other countries," Egerstad said.
"I hope this makes them take action. Hopefully faster than ever before, and I hope they become a bit more aware of security issues."
Graham Cluley, senior technology consultant at Sophos, said that it was highly embarrassing for the governments and embassies concerned that details of how to log-in to their email accounts had been uncovered.
"It is unclear at the moment as to how this information leaked out, but it is quite possible that human error is to blame," Cluley told vnunet.com.
"An organisation's security is only as strong as its weakest link, and people make mistakes."
Cluley added that common mistakes include choosing easily guessable passwords, using the same password for every website, or not changing a password on a regular basis.
Cotton seedling freezes to death as Chang'e-4 shuts down for the Moon's 14-day lunar night
Fortnite easily out-earns PUBG, Assassin's Creed Odyssey and Red Dead Redemption 2 in 2018
Meteor showers as a service will be visible for about 100 kilometres in all directions
Saturn's rings only formed in the past 100 million years, suggests analysis of Cassini space probe data
New findings contradict conventional belief that Saturn's rings were formed along with the planet about 4.5 billion years ago