The one-story building, which was home to 80 people, in the town of Beloyarsky in the Khanty-Mansi Autonomous Area, caught fire Sunday at 1.18 a.m. Moscow time (9 p.m. GMT Saturday).
The flames destroyed the roof and internal walls, killing four Ukrainians and injuring another four and two Belarusians. The identity of a fifth body is yet to be established, a representative of the Emergency Situations Ministry said.
"On May 11, 2006, the Beloyarsky mayor issued an executive order saying that the hostel, located at 22 Ulitsa Stroitelei, was unfit for further use or service," the ministry said, adding that the building had continued to be used regardless.
Since the collapse of the Soviet Union many people from the former Soviet republics have come to Moscow and other Russian cities in search of employment. They usually find unskilled jobs, often work illegally, and have to live in poor conditions.