Five Chinese students have been jailed after one of them used a loophole in the KFC’s app to order unlimited amounts of chicken for free.

23-year-old Xu first discovered the glitch in 2018 when he found out he could effectively generate endless food vouchers by switching between KFC’s phone app and the company’s store on WeChat- China’s equivalent of WhatsApp.

This method allowed him to place an order using the voucher but it would also still remain in his account. Xu sold some of the meals at a reduced price to make profits while also eating them himself.

He then shared the loophole with four of his friends and together, the five of them carried out fraud worth £15,000 (K16, 899,000) of chicken before they were busted by the police, according to Thepaper.cn.

After being caught, the group of friends admitted fraud. At the court in Shangai this week, Xu was jailed for two and a half years and fined £700 (K788, 620) over the scheme, while his accomplices were jailed for two years.

The Court disclosed that between April to October in 2018, Xu caused losses worth £6,500 (K7, 322, 900) to KFC with his orders while his friends ordered food worth £1,000 (K1, 126, 600) and £5,200 (K5, 858, 320) each.