Derbyshire's decision to bat first saw the side reaching 351 after losing all their wickets in 97.2 overs.
Zaheer was initially lacklustre but he came back to remove Graham Wagg (45), who was caught by Worcestershire skipper Vikram Solanki, just when the batsman was looking dangerous.
Zaheer's first innings spell read 17-2-57-1.
In reply, Solanki (140) led from the front as Worcestershire ended the second day of the Championship match at 457 for five, which gave them a 33-run lead.
Steven Davies was not out on 101.