Thousands of modern BMW models can be stolen in minutes – even without the keys – according to an investigation by BBC programme Watchdog.

The thefts, affecting tens of thousands of models produced between 2006 and 2011, involve the programming of a new blank key to match the vehicle's unique identity.

BMWs don't actually have physical metal keys, but a piece of plastic that slots into the dash – it's this connection that allows the car to be started.

The reprogramming process usually takes a trained technician up to 40 minutes, but sly car thieves can manage it in minutes after smashing their way into the car, allowing them to start the vehicles and drive them away. X5 and X6 models are particular targets due to their high value.

For obvious reasons, Watchdog didn't reveal the intricate details of the process in last night's programme, but it's understood that the device plugs into the vehicle's diagnostics port, something you might have spotted in your car's passenger footwell.

Usually used for simple things like resetting the "service due" alert or reading fault codes, criminals have managed to crack BMW's software and use the port to programme a new key.

While BMW models are currently being targeted, they're far from the only possible victims. With similar ports standard in almost all cars produced since the mid-90s, most modern motors could be stolen in a similar way.

BMW issued the following statement: "Our engineers and technicians review all aspects of our vehicles constantly, including security systems, and after extensive research we are clear that none of our latest models – new 1 Series Hatch, 3 Series, 5 Series, 6 Series and 7 Series – nor any other BMW built after September 2011 can be stolen using the method highlighted.

"However, as responsible manufacturers we are looking at ways of mitigating against this new kind of attack. We are now in the process of offering any concerned customers of targeted models, extra technical measures which will mean the car cannot be taken using the piece of equipment highlighted in these stories, although of course there is no such thing as the 'unstealable' car."

Concerned owners should call BMW's customer services department on 0800 083 4397 or their local BMW dealer.

BMW also suggests owners follow police advice on securing their car which includes making sure the doors are actually locked after using remote locking, checking carefully who has been given your keys (for example, valet parking) to ensure they haven't been cloned and parking in a locked garage or in sight of CCTV cameras where possible.

BMW owners come up with their own anti-theft solution