Tens of thousands of refrigeration units at major UK supermarkets, warehouses, restaurants, petrol stations and stadiums were secured from hackers in a secret operation, the BBC has learned.

Security researchers found a major flaw in late October in the controllers made by British firm Resource Data Management (RDM). Staff at refrigeration consultants Omega Solutions discovered the problem. Pen Test Partners verified and expanded on it.

The National Cyber Security Centre, the Department for Environment, Food & Rural Affairs and the Food Standards Agency then worked with industry to contact at-risk firms. Thousands of devices were taken off the open internet, either remotely or physically, according to the BBC. In some cases staff removed internet cables and monitored temperatures manually.

A worker at one large supermarket chain said the company took hundreds of devices offline every day for a week. The worker did not want to be named. Ken Munro of Pen Test Partners said the RDM controllers had a weak password problem similar to controllers attacked in earlier incidents.

RDM disputes the critical nature of the vulnerabilities. Its CEO, Ged Evans, said the test "went beyond" usual exercises because it included dismantling the hardware. He said RDM has deployed first patch releases and has contacted customers. RDM said it has seen no sign of malicious activity on its controllers.

Earlier this year, attacks on refrigeration temperature controllers hit fridges at US military bases in August, supermarkets and food processing sites in France in October, and supermarkets in seven European countries on 1 and 2 November. France has blamed Iran for one wave of attacks, a claim Tehran denies.