An official Somalia radio broadcast quoted a man identified as a Cuban soldier yesterday as saying he was captured by Somali rebels fighting in the war for eastern Ethiopia's Ogaden region.

The broadcast identified him as Orlando Carlos, Cuban army serial number 100160, from Havana. It said he confirmed he was taken prisoner on the edge of Harrar, headquarters of Ethiopia's 3d army division.

The soldier was quoted as saying 30 Cubans were killed in the battle when Ethiopian forces, aided by Cuban and Soviet troops, launched an offensive against the rebel Somali positions. Cuban advisers were stationed in Somalia until they were ousted last year at the time of increased Soviet and Cuban involvement in Ethiopia.

In Paris, diplomatic sources said Cuban Defense Minister Raul Castro and Ethiopian President Mengistu Haile Mariam escaped unhurt in an assassination attempt in Ethiopia two weeks ago.

A bomb was hurled at a car carrying the two men and an unidentified Soviet general during a Jan. 12 visit to Harrar, according to the unconfirmed reports. The explosion reportedly killed several guards, including five Cubans and a Russian.

Government sources in Washington said Cuban pilots have been identified flying Mig-17 jets supplied to Ethiopia by the Soviet for use in an Ogadan counteroffensive.