Pakistan, fighting to save the three-match series after the innings and 52-run drubbing in the first Test at Multan last week, slipped from the overnight 355 for three to 386 for seven before going to lunch on the third day at 419-7 in their first innings.
Pakistan are 132 runs ahead of India's 287 with three wickets in hand on Wednesday.
Left-handed Asim Kamal was unbeaten on 26 and number nine Shoaib Akhtar was on 14, the pair having added 33 runs for the unbroken eighth wicket.
The hosts made a disastrous start on the third day, losing four wickets in the space of 30 runs with Pathan being the main destroyer.
The 19-year-old, who took six wickets in the Multan Test, trapped captain Inzamam-ul-Haq leg-before with the sixth delivery of the day.
Inzamam did not add to his overnight score of 118 which was studded with 14 boundaries.
Two overs later, Laxmipathy Balaji forced an edge off Pakistan's vice-captain Yousuf Youhana to wicketkeeper Parthiv Patel.
Youhana, playing his 50th Test, made 72 with 13 hits to the fence and his departure ended Pakistan's hopes of building a huge first innings lead.
Pathan added two more scalps in successive overs, claiming Kamran Akmal leg-before for five and then bowling Mohammad Sami with a sharp inswinger for two.
Balaji and Pathan have both claimed three wickets so far, but star spinner Anil Kumble has gone wicketless in 35 overs at a cost of 122 runs.