British Gas has become the latest victim of a data scandal after thousands of customer details were leaked and posted online.

Email addresses and passwords of approximately 2,200 customers have been compromised.

British Gas disabled the affected accounts after the private details were posted to the document-sharing site Pastebin, and removed later.

It is suspected that the logins may have been used to see usernames, contact details and past energy bills.

The BBC reported that it had seen an e-mail sent to affected customers, in which the utility said that the leak was not due to a breach of its own systems.

"I can assure you there has been no breach of our secure data storage systems, so none of your payment data, such as bank account or credit card details, have been at risk.

"As you’d expect, we encrypt and store this information securely. From our investigations, we are confident that the information which appeared online did not come from British Gas," the email read.

A British Gas spokeswoman said the leaks affected only a small proportion of its 14 million customers.

The breach of British Gas follows a glitch on Marks and Spencer’s website, which allowed customers to see details of other people when they logged in to their own accounts.

TalkTalk recently had a cyber attack, leading to the theft of personal data of over four million customers.