The Chilean has not played since going off injured during the first leg of Bayern's quarter-final tie with Sevilla on April 3. He twisted his right knee during a training session on Saturday and underwent surgery on Monday.
"Vidal underwent surgery on his knee yesterday, ruling him out for the rest of the season," said a statement on Bayern's official Twitter account on Tuesday.
Vidal was sent off when Bayern met Real in last season's quarter-final second leg, which the Spaniards won 4-2 after extra time to clinch the tie 6-3 on aggregate on their way to winning the trophy.
Bayern, who face Bayer Leverkusen on Tuesday in a German Cup semi-final, were crowned Bundesliga champions earlier this month for a sixth consecutive season and are bidding to win the treble for the second time in their history.
Jupp Heynckes' side host Real in the first leg of their semi-final tie on April 25, then head to the Santiago Bernabeu for the return game on May 1.
(Reporting by Richard Martin; Editing by Toby Davis)
