Some dreadful defending saw the hosts fail to clear their lines as Luiz, Thiago Silva and Luiz Gustavo lost their bearings and Cavani drilled in hard and low to stun the home support.
Forlan then had a half-chance to atone for his earlier faux pas, but fired straight at Cesar.
Scolari reacted to an increasingly leaden showing taking off Zenit St Petersburg’s Hulk and replacing him with local favorite Bernard.
Scolari also took off Oscar and sent on Hernanes in an attempt to inject some fresh drive.
Yet it was Uruguay who were turning the screw with first Luis Suarez heading fractionally over from a Forlan cross on 73 minutes before Cavani turned Hernanes inside out and slid an effort just wide as the Uruguayans attacking trident almost embarrassed a shaky home back four.
However, with four minutes remaining Neymar whipped over a corner from the left and Paulinho outjumped Martin Caceres and seal Brazil’s place in the final.
Additional reporting by staff writer