But it's not a completely happy ending - the girls are traumatized and distressed after 30 months in captivity, and little is known about the fates of the almost 200 others who are still missing.
And even less is known about the other children caught in the web of this conflict, those who are suffering horrific abuses perpetrated not by Boko Haram, but by the Nigerian government.
An Amnesty International investigation in May revealed
that more than 120 boys were being held incommunicado in a disease-infested cell at the notorious Giwa barracks detention center in Maiduguri, the capital of Borno state. Children under five years of age were detained in three women's cells. The same investigation showed that 12 children, including infants and babies, died in Giwa between January and May, falling prey to malnutrition and disease. (Nearly 150 adults also lost their lives.)
These children are the forgotten victims of Nigeria's fight against Boko Haram.
The government claims that Giwa houses Boko Haram suspects in transit to more established detention centers, but in fact, its detainees are just as likely to be displaced civilians caught in the army's counter-insurgency dragnet. More than 1,000 people are still believed to be held at Giwa, most of them arrested en masse without being formally charged.
After Amnesty International's report was published May, Nigerian President Muhammadu Buhari told CNN's Christiane Amanpour there would be a thorough investigation into the detention facility.
Five months on, there have been reports of some releases of "cleared detainees" from Giwa Barracks, but there has still been no investigation into the detention of children, or into the deaths of adults and children at Giwa. Our research shows that the cells at Giwa are still being filled, and adults and children are still dying there.
Since President Buhari's on-air promise to CNN, Amnesty International has confirmed the deaths of 15 more babies and toddlers at Giwa. Babies are also being born in detention: one former detainee who was released earlier this year told us that 15 babies were born in the six months she was detained.
Umar, a young boy who was recently released from Giwa, spoke to Amnesty International about conditions there, describing how more than 200 boys were crammed into his cell, a significant increase from the 120 boys Amnesty recorded in the same cell in May.
Their cell is so cramped that some boys have no choice but to sleep on top of each other, said Umar, whose name has been changed to protect his identity. They are never allowed outside, except to be counted by their captors. Umar said that 50 of the boys in his cell were no older than 6.
Umar was taken to Giwa from a displacement camp in Bama after he and his family fled violence and intimidation by Boko Haram militants. His father was accused of aiding the group, and so Umar was locked up in Giwa without charge.
Until May this year, an adult detainee from Giwa would visit the boys' cell each morning to try to continue their schooling. He taught the boys the English alphabet and numbers by rote, but when he was released, the boys just waited in their cell for the day to pass.
Umar says they had nothing but a few balls provided by the soldiers to roll around the cell. That, and the occasional roll call outdoors, were almost the only things punctuating the boredom of their detention.
It often took two days to get a doctor to see those who were sick. Many of Umar's cellmates had malaria, including a seven-year-old who died of the disease.
"They took him outside. I don't know where to," Umar said. "There was not enough food and water. It was unhygienic."
As with all detainees at the barracks, Umar claims that he and the rest of the children were held incommunicado and denied access to their families and the outside world.
The wider crisis
Beyond the horror of the abducted Chibok girls and the children left to die in Giwa, "free" children in northeastern Nigeria don't necessarily fare much better.
The region is facing one of Africa's largest humanitarian crises. Since 2009, Boko Haram has wreaked havoc in the region, killing thousands of people. Around 2.4 million have been displaced, the majority of whom are children.
Many are living in camps in horrific conditions, at risk of dying from severe malnutrition, dehydration and inadequate medical care, and with little to no assistance from the outside world.
Conditions in Borno State are particularly dire and humanitarian assistance is urgently needed.
Unicef says there are 244,000 children suffering from severe acute malnutrition in Borno, and that an estimated 49,000 children will die if they don't receive treatment.
Displaced people at the Bama camp where Umar stayed have given Amnesty International harrowing accounts of life there, describing how children regularly succumb to starvation and disease.
"Most of the women have lost children," one woman told us after leaving Bama. "In our group, there are 15 women from one village -- we lost 20 children."
Médecins Sans Frontières has counted 1,233 graves near the camp in the past year. Of them, 480 were for children.
What can be done?
We call on President Buhari to keep his word and investigate thoroughly the abuse and deaths at Giwa. It's a death camp that must be closed. The fight against Boko Haram is no excuse to imprison children.
The previous government was astonishingly slow to respond to the Chibok girls' abduction in the first place; President Buhari's administration must now spare no efforts to bring them back, along with all the others who have been abducted. The wider crisis has been neglected long enough. The response to the humanitarian needs of those affected by the conflict has not only been slow, but also inadequate.
The government and international community must not forget the children who suffer in silence in places like Giwa and the displacement camps in Borno, surrounded by tiny graves that shame us all.