An official for Mexico's federal attorney-general said a judge ruled that Fallon Rouiller Poisson and Amelie Pelletier will stay behind bars while local authorities continue their criminal investigation into the attack.
"They will be held in a detention centre until the end of the investigation," the official, who did not want to be named, told The Canadian Press.
Poisson and Pelletier were apprehended in the capital Sunday after Molotov cocktails damaged a building that houses a federal government office and a nearby car dealership.
The official said the women could also be released before the 40-day period expires, as long as they produce evidence that proves they could not have participated in the attack.
He said that for now the case is being considered vandalism, but added the ongoing investigation could lead to more serious criminal charges.
Poisson, a 20-year-old from Montreal, and Pelletier have yet to be charged with any crimes.
The official said a Mexican national named Carlos Lopez Marin was arrested along with the Canadians in connection with the firebombing, which struck the facade of a building that houses the offices of the Department of Communications and Transportation.
Marin has also been ordered to remain in detention for up to 40 days.
A Mexican prosecutor has said police allege one of the Canadians was seen discarding a knapsack that contained several homemade explosive devices.