Consumers are being told of the dangers of buying “cheap and cheerful” Christmas tree lights through online marketplaces, after a new investigation revealed that nearly half those it tested could cause a fire or electric shock.

Consumer group Which? carried out a series of tests according to the electrical safety standard, which products must pass to be sold in the UK, on 13 products bought from third-party sellers across four online marketplaces, and two from high street retailers.

Six of the 13 sets of Christmas tree lights bought through online marketplace sellers failed the testing and were deemed dangerous. AliExpress, eBay and Wish each sold two products that failed the tests.

In two cases, control boxes on lights bought from AliExpress and eBay got so hot during a short-circuit test that they began to smoke and melt. The insides were left charred and the circuit board reduced to a molten plastic mess by the end of the test.

Five products from Amazon Marketplace passed all the electrical safety tests, while lights from high street retailers John Lewis and Argos also passed.

In addition to the electrical testing researchers looked at whether the lights had all the correct information – such as the right safety markings and instructions – needed for them to be legally sold in the UK. Four of the five bought from Amazon Marketplace didn’t have this so were non-compliant.

The 12 unsafe or non-compliant products were purchased from third-party sellers across all four marketplaces. In total, just one set of lights bought from across the four online marketplaces passed all of the safety tests and a compliance check. These were purchased from Amazon Marketplace.

Natalie Hitchins, Which? head of home products and services, said: “Many of the cheap and seemingly cheerful Christmas lights we’ve tested from online marketplaces simply aren’t safe, and we’ve found some even have the potential to set a tree alight.

“The significantly better performance of products bought from high street retailers exposes how necessary it is to strengthen consumer protections for online marketplaces.

Ebay said in a statement: “Ebay doesn’t permit the listing of unsafe products. The items have been removed and the sellers advised to contact any buyers with the alert and their return policy.”

AliExpress commented: “Customer safety is of paramount importance. We have informed the sellers and removed these listings. Merchants need to comply with all regulations in the markets they sell to.”

Amazon said: “All sellers must follow our guidelines and those who do not will be subject to action including potential removal of their account. The products in question are no longer available.” Wish did not provide a comment.

Martyn Allen, technical director at the Electrical Safety First charity commented: “The new government must now stand up for the consumer and hold online marketplaces to account.”