Danilo will have surgery on a heel injury on Thursday, Real Madrid has confirmed.
The right back joined Madrid from Porto at the start of last season, making 31 appearances in all competitions as he battled with Dani Carvajal to be first choice.
The Brazilian replaced Carvajal early in the second half of the club's Champions League triumph over Atletico Madrid at San Siro at the end of last month, but is now set to go under the knife.
"Following tests on our player Danilo, the decision has been taken to carry out an endoscopy on his right heel," a Madrid statement read.
"The operation will take place on the 9th June in Madrid by doctors Niek van Dijk, Pedro Luis Ripoll and Mariano del Prado, under the supervision of the Real Madrid Sanitas medical services."