Inmates had been given permission to grow flowers and plants in the garden in their exercise courtyard, Emirates 24/7 reports.
Christophe Beaulieu, regional official of the prison officers' union, defended the warders of Saint-Martin-de-Re prison in the west of France.
He said: "When you don't know what you are looking for it is easy to confuse them with other plants."
The plants had reached a height of 80cm (two and a half feet) before they were spotted.
> Cannabis farm discovered on Pot House Lane
> Cannabis vending machine seized by New Zealand police
> Pensioners tricked into growing cannabis