Bundesliga leaders Bayern Munich needed a Franck Ribery penalty in the last minute of extra time to see off second-division city rivals TSV 1860 Munich 1-0 in the quarter-finals of the German Cup on Wednesday.