She was writing an entrance exam - called the Kankor exam - for the social science course at Nasirkhosraw Higher Education Institute in Nilli city. It was during the exam that her two-month-old baby started crying.
According to Yahya Erfan, a lecturer at the university who was monitoring the test, she got up from her desk, sat cross-legged on the floor and continued writing answers while nursing her baby.
Mr Erfan took a few photographs of the powerful scene that played out in front of him and shared them in a Facebook post. Though the original post has now been deleted, the pictures have gone massively viral and have been re-shared thousands of times.
People on social media love the image and what it conveys. "Afghan women are unstoppable," says one viral tweet. Many others have called Ms Taab "inspiring" and "a legend".
Inspiring photo from social media: this mother is taking university entrance exam while taking care of her child, in Daikundi. Afghan women are unstoppable. pic.twitter.com/lus0eeuH48- Shaharzad Akbar (@ShaharzadAkbar) March 19, 2018
Wow!- Zakarya Hassani (@ZHassani7) March 19, 2018
This picture makes us feel better.
In order to say no to the ignorance, this #woman in central #Daikundi province of #afg while hugging her child participated in Kankor exam to join university & bring positive changes to her family's life.
Photo: social media pic.twitter.com/tzri8NBSiw
"It was amazing and all of the classmates were in admiration of her," Mr Erfan told CNN.
The local Etilatrooz Daily newspaper reports that Ms Taab, who is married to a farmer, is keen to continue her education.
A British organization, the Afghan Youth Association, has launched a GoFundMe to support Ms Taab's studies, calling her a "role model to thousands of other Afghan women who face similar challenges".
Click for more trending news
Get the latest election news, live updates and election schedule for Lok Sabha Elections 2019 on ndtv.com/elections. Like us on Facebook or follow us on Twitter and Instagram for updates from each of the 543 parliamentary seats for the 2019 Indian general elections.