Militant fighters stormed the base at Sasawa village, some 45 kilometres from the Yobe state capital, Damaturu, on Tuesday, in the third such attack on the military in two weeks.
The Nigerian Army has confirmed the attack and said only there were “casualties on both sides”.
But a military source said: “So far, 15 bodies of soldiers killed in the attack at Sasawa have been recovered, including that of an officer.
“Seven more bodies were found in the course of search and rescue operations by 27 Brigade and 233 Battalion. More (soldiers) are still missing and their fate is unknown.”
The source, who asked not to be identified as he was not authorised to talk to the media, said Boko Haram fighters took away two pick-up trucks equipped with anti-aircraft guns.
According to the SITE Intelligence Group, the raid was claimed by the Islamic State’s West Africa Province.
That indicates fighters loyal to Abu Mus’ab al-Barnawi were responsible. IS designated al-Barnawi leader of the group last year instead of long-time figurehead Abubakar Shekau.
The al-Barnawi faction is known to have been operating just across the border in Borno state and has been blamed for a number of similar raids.
In July, 19 soldiers and 33 militia members were among 69 killed in a Boko Haram attack on a heavily armed convoy of oil exploration workers in the Magumeri area of Borno.
Tuesday’s attack in Yobe also saw Boko Haram fighters seize grain from food stores in the village after a six-hour firefight with troops.
Security analysts have suggested the increase in attacks on military posts is linked to the end of the rainy season plus the need to restock depleted supplies of food and weapons.