The Nigerian aid workers are with the U.S. non-profit organization FHI 360 and were taken on April 25 from Ngala, Borno State, near the border with Cameroon.
"FHI 360 has been informed that Nigerian authorities have recovered two of our abducted team members," FHI 360, spokesperson Christy Delafield told AFP.
She did not say if the aid workers were rescued or whether they had escaped.
Two contractors were also abducted and are still missing alongside a third aid worker.
"We continue to urge the unconditional, immediate and safe return of those still missing," said Delafield.
It wasn't clear who was responsible for the abduction but both Boko Haram, which kidnapped hundreds of schoolgirls in Chibok in 2014, and ISWAP, linked to the Islamic State group, operate in the region.
Two security sources who asked to remain anonymous told AFP the aid workers were rescued from an ISWAP camp in Gargash village on Sunday.
"It was an intensive operation involving troops and CJTF (anti-jihadist militia)... which led to the killing of a substantial number of the terrorists," one of the security sources told AFP.
"Two of the kidnapped staff identified themselves to the troops while the third staff and the two security guards kidnapped along with them fled into the bush to escape the fighting and are yet to be located," he said.
The second security source who also confirmed the rescue said, "More than a dozen guns and three trucks were seized from the terrorists during the operation."
Insecurity is a major concern in Africa's most populous nation as a new president is set to be sworn in this month following an election disputed by the opposition.
In the northeast, more than 40,000 people have been killed since a jihadist insurgency began in 2009, according to the UN. Two million more have been displaced from their homes.
Nigerian troops are stationed in the region at "super camps" but raids continue in rural areas, with militants launching attacks from their forest enclaves.
The violence has spread to parts of neighboring Niger, Chad and Cameroon, prompting a regional military coalition to fight the militants.