Mazzarri's men fell to an unexpected defeat at the hands of the relegation candidates just days before their crucial clash against Bayern Munich in the Champions League
After a rather uneventful first half, Massimo Gobbi and Guiseppe Mascara traded goals in the second period, but just before the end of the match Francesco Modesto decided the tie with a strike from close range.
The game got off to a rather slow start as both team employed a rather defensive approach in the early minutes.
Chance were few and far between, but Parma were first to threaten to score as Sebastian Giovinco had a shot from outside the box blocked in the 13th minute, and moments later the ex-Juventus man had a dangerous free-kick miss the target.
Parma had a pair of chances just before half-time through Sergio Floccari, who saw a header blocked, and Abderazak Jadid, whose shot was saved by Morgan De Sanctis.
Napoli also stepped up a gear in the final minutes of the first period as Gokhan Inler saw a powerful drive saved by Antonio Mirante, and Christian Maggio had the fans holding their breaths as he received the ball just outside the six-yard box, but was dispossessed by Alessandro Lucarelli.
The game sprung into life in the second period as Marek Hamsik, Gokhan Inler, Ezequiel Lavezzi and Cavani all saw shots blocked or miss the target shortly after the restart as Napoli were tightening their grip on the contest.
Parma, however, took advantage of the hosts' reckless attacking and managed to open the scoring in the 57th minute through Gobbi, who powered a shot past De Sanctis after a sublime backheel by Sergio Floccari.
Napoli doubled their efforts in search for an equaliser, and finally got their goal in the 76th minute, when Mascara finished off a fine team move to claw one back for Walter Mazzarri's side.
The hosts' joy did not last long, however, as shortly after the ex-Catania man's strike Modesto hammered home the winner from close range, following a cross by Sebastian Giovinco, to seal the three points for Franco Colomba's men.
Cavani was unfortunate to hit the right post from a tight angle moments before the final whistle as Napoli just ran out of luck, and had to accept defeat.
Following tonight's result, Napoli are third in the standings with 10 points, while Parma are seventh with nine. Walter Mazzarri's men visit Cagliari in eight days in the next Serie A game, while Parma host Atalanta on the same day.