Driverless cars could be hacked and deployed as "fully loaded weapons", according to the chief executive of Canadian company Blackberry.

Best known for its smartphones, the company is developing software for driverless cars in partnership with Baidu, the Chinese web search giant.

John Chen, Blackberry's chief executive, said driverless cars were programmed with more lines of code than a typical fighter jet, offering enormous scope for hackers to exploit vulnerabilities to insert malware.

"A car could easily be infected with viruses [and] is literally a fully loaded weapon. If hackers can get hold of it, you can imagine what they could do."

Advertisement

He added that the industry was working hard to reduce the risks.

"I can create a car I think is 90 per cent virus-free but as soon as that car gets on the road and is being used, those conditions need to be regularly checked," Chen said.

Unlike a jet, all of the code comes from different sources, which can exacerbate its vulnerabilities to cyber attacks. Despite huge investment from tech giants like Google, Apple or Tesla, Chen claimed driverless cars would take at least another five years to take off commercially.

Chen has called for governments to set safety standards that tech giants can adhere to.

"Regulation, and safety and security tech needs to be established well before I think anyone should allow the cars on the road," he said. "The self-driving car still has a lot of human error and safety control."

He also pointed to the coexistence of driverless cars with manned vehicles on the road as a major challenge. "If there is a crash, who would the insurance hold liable — the human or the car?" he said.

Chen's comments come just weeks after Apple's self-driving car crashed on a test-run near its headquarters in Silicon Valley while it was on "autonomous mode". Self-driving cars designed by Waymo, a subsidiary of Google's parent company Alphabet, have problems understanding the basic rules of the road.

- Telegraph Group Ltd