After his side was bundled out for 161 handing Sommerset a healthy 245-run lead, Zaheer, who had a four-wicket haul in the first innings, produced another fiery spell of pace bowling and helped Worcestershire to stay in the match.
However, Sommerset still have a firm grip on the tie with an overall lead of 342.
After Kabir Ali removed the England opener Marcus Trescothick (5) early, Zaheer trapped M J Wood leg before, who was looking good at 44. With the floodgates opened, the Baroda paceman struck again removing J D Francis (1) in similar fashion.
In his second spell, Zaheer sent C M Gazzard (4) and P D Trego (0) back to the pavilion cheaply to leave Sommerset tottering at 97 for seven.
Earlier, resuming on their overnight total of 89 for three, Worcestershire batsmen were bundled out for 161 courtesy former England paceman Andy Caddick, who ripped through the opposition batting claiming five for 40.
Elsewhere, compatriot Dinesh Mongia flattered to deceive with both the bat and the ball as Surrey moved into the driving seat against Leicester.
Surrey, who made 370 in the first innings, dismissed Licestershire for a paltry 244. The Punjab southpaw made only 4 runs before being dismissed by T J Murtagh. Murtagh (3-48) and Indian-born Nayan Doshi (3-21) were the pick of Surrey's bowling attack.