Cacau fired home four minutes into injury time as Germany somehow salvaged a 2-2 draw in a dramatic finish to their friendly international against Euro 2012 co-hosts Poland in Gdansk.
Having reeled off a perfect record of eight wins to become the first side to qualify for the finals, the Germans were given a much sterner test by the Poles and looked like sliding to defeat.
Jakub Blaszczykowski fired home a penalty in the final minute after a foul by German goalkeeper Tim Wiese on Pawel Brozek to put the Poles 2-1 up.
But there was still time for Cacau to slam an equaliser into the roof of the net after Thomas Muller found the Brazil-born striker on the left side of the six-yard box.