A team of researchers was able to hack the controls of a Tesla Model S – adjusting the mirrors, locks and, even from a distance of 12 miles, slamming on the brakes.

The Chinese security researchers from Keen Security Labs alerted Tesla to the vulnerability just over a week ago, and the electric vehicle manufacturer moved quickly to patch the flaw.

After the vulnerability was fixed, the researchers went public with a video of their demonstration, showing how the Model S could be targeted wirelessly and remotely.

As reported by The Guardian, the hack targets the car’s controller area network, or CAN bus – the collection of computers found inside modern vehicles that control everything from lights to indicators, windscreen wipers and, most worryingly of all, the brakes.

The attack – which is shown being demonstrated on a Model S P85 and 75D – requires the car to be connected to a malicious Wi-Fi hotspot set up by the hacking team, only possible via the car’s web browser.

Speaking to Reuters, Tesla said that the risk to its customers was “very low”, but it did not stop them from responding quickly.

For their part, Keen praised the company’s “proactive attitude” in dealing with the vulnerability, while also encouraging Tesla drivers to update the firmware of their cars to ensure the issues are fixed and potential risks are avoided.

While Tesla was able to act swiftly and responsibly on this occasion, the security of connected cars remains an important challenge for the auto industry.

Earlier this year, more than 50 automotive experts participated in creating the first ever set of cybersecurity best practices for the industry.

As more vehicles than ever ship with data connections, examples like Tesla and Jeep highlight the need for manufacturers to prioritize security in their latest models.