A major data breach in Somalia's electronic visa system may have exposed personal information belonging to tens of thousands of applicants, including US citizens, the American embassy in Somalia has warned.

It said had received credible reports that "unidentified hackers" had penetrated the Somali government's e-visa platform, potentially compromising data from at least 35,000 people.

The leaked documents circulating online include names, photos, dates of birth, marital status, home addresses and email contacts, according to a US embassy statement issued on Thursday.

"This data breach is ongoing and could expose any personal data you enter into the system," the UK has also warned travellers.

"Consider the risks before applying for an e-visa required for travel to Somalia."