The visitors, seeking a third consecutive tournament triumph, were kept out by a resolute defensive display until Pastore struck 12 minutes from time.
Fellow sub Cavani then sealed the victory in stoppage time, just after Lucas Moura – the other man to come on – was thwarted by a patch of mud in the six-yard box.
Unai Emery made eight changes, including giving Grzegorz Krychowiak his first appearance of 2017, but ultimately needed to bring on Pastore and Cavani from the bench to settle the last-16 tie.
PSG are now 15 games unbeaten across all competitions after edging past the side who sit 12th in the second tier.
Two PSG defenders came close in the early stages of a match which kicked off in extreme wet conditions.
Thomas Meunier forced a save from home goalkeeper Arthur Desmas, while Marquinhos sent a flying header just over, with Christopher Nkunku creating both chances.
Desmas had to react quickly when Niort defender Jeremy Choplin deflected Goncalo Guedes' cross towards his own goal, before the January signing – making his first PSG start – blazed over from a good shooting opportunity.
Guedes poorly scuffed wide from a close-range chance early in the second half, before the visitors survived a scare at the other end when keeper Alphonse Areola completely missed a high free-kick, Blaise Matuidi hacking clear.
Desmas rushed out to save from Jean-Kevin Augustin, while the striker – making only his third start of the season – was denied by a key block from Choplin from his next effort.
That was Augustin's last action as Emery called for Cavani from just before the hour.
Nkunku had a penalty claim denied after going down under Dylan Bronn's challenge, Cavani fired wide from a 30-yard free-kick and Marquinhos was just off target with another headed effort as PSG continued to toil.
With the tie drifting towards extra-time, Pastore was Emery's next big name to come off the bench just after Presnel Kimpembe's acrobatic effort from a corner had been cleared off the line by a combination of team-mate Matuidi and defender Salomon Sambia.
And Pastore found a breakthrough under five minutes after his arrival, sliding in to convert Nkunku's excellent free-kick from inside the six-yard box.
Niort came closest to a response when Areola made a key save from Enangon Kiki following a goalmouth scramble that had seen Desmas come up for a late corner.
With Desmas out of position, PSG were somehow denied on the counterattack when Lucas rolled a strike towards goal which stopped inches before the line on the sodden pitch, allowing Jimmy Roye to clear.
But PSG did strike again, Cavani converting from a few yards out four minutes into added time after latching on to Pastore's low cross as Emery's men kept their hopes of another domestic clean sweep alive.