At least 25 inmates and two security officers have been killed after a riot broke out at a high-security prison in Tajikistan, three security sources said on Thursday.