The 19-year-old Pavic saved all four break points he faced and converted four out of the six he earned.
Pavic said “my coach told me to play my game and not pay attention to the fact that is a former No. 1. This win means so much.”
Ferrero won Umag in 2010, defeating Potito Starace of Italy in the final for one of his 16 career singles titles.
Earlier Tuesday, Starace beat Slovak qualifier Ivo Klec 6-3, 7-6 (6) to advance to the second round.
In another upset, American Wayne Odesnik beat eighth-seeded Edouard Roger-Vasselin of France 6-7 (4), 6-2, 7-5.
Fabio Fognini of Italy, Blaz Kavcic of Slovenia and Marco Trungelliti of Argentina also advanced.
Fognini, a semifinalist in 2008 and 2011, defeated Karol Beck from Slovakia 6-3, 6-1, Kavcic downed Croatia's Antonio Veic 6-2, 6-2 and Trungelliti beat Paolo Lorenzi of Italy 7-5, 6-4.