The involvement of the two-Horn of Africa rivals could set the stage for a regional war, said the UN report, which was obtained by the Associated Press on Thursday.
Islamic radicals, said by the UN to be backed by Eritrea, held rallies in several cities calling for a holy war on Ethiopia and the internationally backed government it supports.
The UN report cites diplomatic sources in estimating that "between 6,000-8,000 Ethiopians and 2,000 fully equipped Eritrean troops are now inside Somalia supporting" the internationally recognised government and the Islamic group known as the Council of Islamic Courts, respectively.
"Both sides in the Somali conflict are reported to have major outside backers - the government supported by Ethiopia, Uganda and Yemen; the Islamic Courts receiving aid from Iran, Libya, Saudi Arabia and Gulf States," the briefing paper says.
The transitional government and the Council of Islamic Courts have been girding for battle in recent weeks.
Government forces, supported by Ethiopian military advisers, have been seen digging trenches near Baidoa, the only town the UN-backed government controls.
Ethiopian officials have insisted they have only a few hundred military advisers assisting the government, but international and local officials have previously put the number in the thousands.
In more than 40 towns and villages across southern Somalia on Friday, thousands took to the streets after calls from Islamic leaders to protest against Ethiopia's backing of the virtually powerless government.
Sheikh Shariif Sheikh Ahmed has
promised to wage war
The demonstrations, which featured the burning of Ethiopian flags, were also being used to recruit fighters for a holy war against Ethiopia, Somalia's traditional rival.
Recruiting was expected to continue over the next three days.
"From this time on, we will wage a war against Ethiopians inside Somalia," Sheikh Sharif Sheikh Ahmed, a senior Islamic leader, told thousands of Somalis in Mogadishu. "We need anyone who can give us weapons, even a dagger."
The crowd responded with Islamic chants and cheers as they described Ethiopia as a Christian country invading a Muslim land.
"I am here by to sacrifice my life for my religion and oppose the unbelievers who want to put my country under their control," said Khadija Sheikh Yusuf, a 20-year-old mother of one.
The UN refugee agency said on Friday that the flow of Somali refugees into neighbouring Kenya had slowed down, but expressed concerns over reports the Islamic courts were preventing people from leaving the country.
The Islamic Courts have deployed forces at a strategic town between Baidoa, and their headquarters in the Somali capital, Mogadishu, 150 miles to the southeast.
The military moves could be mere posturing in the run-up to peace talks scheduled for next week in Khartoum, Sudan, but most observers are pessimistic about the chances for an agreement and fear major fighting could follow if the talks fail.
Ethiopia and Eritrea fought a two-year border war that remains unresolved.
Major fighting could erupt if
peace talks in Khartoum fail
Jendayi Frazer, the US envoy to Africa, last week accused Eritrea of using Somalia to open a second front against Ethiopia.
Sean McCormack, the US State department spokesperson, called on Ethiopia and Eritrea not to further aggravate the tense situation in Somalia.
"There are tensions between Ethiopia and Eritrea even removing Somalia from the equation. When you add Somalia into the equation, each of Ethiopia and Eritrea's various perceived equities with the various groups in Somalia, then it becomes very complex, a complex situation," he said.
The UN briefing paper was written to help senior officials of the organisation map out a strategy on how to provide aid to one of the most impoverished countries in the world, one that has not had an effective central government since 1991.
"In order for us to do this, a clear policy of engagement with the [Islamic Courts] must be put in place," the report says.
"The fact is that there is new found stability in Mogadishu, extending to areas that they have begun to control, which has not been seen for many years."
One problem facing the UN is the listing of the Islamic Courts' leader, Sheikh Hassan Dahir Aweys, on a list of people with ties to terrorism.
UN policy severely restricts how much contact UN officials can have with people with alleged ties to terror organisations.