The workers were constructing a toilet at a school next to the temple in Faridpur’s Madhukhali Upazila
The blaze began around 8 am at a 14-storey building on Banani Road 2.
Two young men named Sagor, 25, and Himel, 19, were rescued by locals and sent to Dhaka Medical College Hospital.
Locals put out the fire before the fire service arrived at the scene, said Fire Service Control Room official Nazma Akhtar.
The fire service has yet to determine the cause of the fire.
Sagor has suffered burns on 65 percent of his body, while Himel has burns on 15 percent of his body, said Dhaka Medical Police Outpost Inspector Md Bachchu Mia.