The psychological thriller shot in Spanish will also compete for the Palme d'Or -- the first time in six years that an opening film will be in the running for the festival's top prize.
While Farhadi won an Oscar and the Golden Bear at Berlin for his 2011 breakthrough film, "A Separation", he has never taken the Palme d'Or, although two of his later films -- "The Past" (2013) and "The Salesman" (2016) -- won best screenplay and best actor and actress prizes.
"Everybody Knows", which also features the Argentine star Ricardo Darin, tells the story of a woman played by Cruz who returns from Buenos Aires to her native village in Spain with her husband and children.
Cruz and Bardem are the golden couple of Spanish-language cinema, and have starred in several films together including last year's "Loving Pablo", about a journalist who falls in love with the notorious Colombian drugs lord, Pablo Escobar.
Farhadi, 45, is one Iran's most renowned directors, who has made a name for himself with tense and carefully crafted stories both inside and outside his homeland.
The film will be released in France on May 9th, the day after the 11-day festival begins.