Five Chinese university students are facing jail time for exploiting the KFC mobile app to get free food and sell it for profit.

In 2018, a student named Xu discovered two workarounds in the KFC mobile app and his WeChat account that let him buy meals for free and sell the exploit for money, according to the Paper.

Xu found he could trick the fast food chain’s app by entering vouchers and refunding or cancelling them through WeChat.

Because of synchronicity problem between the two systems, the KFC app would process the vouchers as payment, allowing Xu to keep his voucher and repeat the process.

Xu sold his stolen KFC at a discounted and conscripted four of his classmates to his side-hustle, with the group costing KFC’s parent company Yum over $40,000 (200,000 yuan) in sales.

The Xuihui Court in Shanghai found Xu and his mates guilty of fraud for using what was effectively a data syncing error – not a software bug – to rig the sales.

It also found Xu guilty of teaching criminal methods.

The court said what the cohort did was analogous to taking cash from a malfunctioning ATM and was therefore "unjustified enrichment".

For their crimes, Xu was sentenced to two-and-half years in prison and fined $1,200 (6,000 yuan) while his four classmates were given reduced sentences ranging from 15 months to two years, and fines between $200 (1,000 yuan) and $800 (4,000 yuan).