The ministers of defence, interior and justice were unharmed after a landmine exploded under a vehicle near the port of Merca, they say.
A governor told the BBC there had been a two-hour gunbattle near Jowhar.
This is the biggest town under the control of al-Shabab Islamists.
The al-Qaeda linked group has been driven out of most urban areas over the past two years still controls many rural areas of the country.
Middle Shabelle governor Abdi Jiinow told the BBC Somali service that al-Shabab had now gathered its forces around Jowhar, 90km (55 miles) north of the capital, Mogadishu, in order to defend the town.