China has detained four people and punished eight for a series of data breaches last month that severely undermined trust in the country's internet security, the official People's Daily reported on Wednesday.

Last month, the user IDs, passwords and email addresses of more than 6 million accounts registered on CSDN -- a site for programmers -- were leaked. The popular social-networking site Tianya was also hit by a data breach.

The data leaks led to a slew of online reports and rumors about other websites being hacked that were later proven unfounded.

The People's Daily reported that Chinese public security organs had investigated the cases and found nine cases of reselling user data, three cases of fabricating and promoting speculation of data leaks. Four people were detained and eight were punished, it said.

A spokesman for the State Internet Information Office said the authorities would continue to crack down on hacking of data and the spreading of rumors related to such breaches.

China has the world's largest Internet user base at 485 million users.

(Reporting by Melanie Lee; Editing by Chris Lewis and Sanjeev Miglani)