OP is your ex a biker? If he is I wouldn't be too concerned, he's not going to let him do something stupid. If he's not then be much more concerned.
Pit bikes are midi sized, normally 110cc and capable of much more than 40mph, lots of teenagers, after their CBTs, find them a cheaper option than a geared 125. The problem on the road is they're so much shorter and you struggle for a decent view of the road so the majority get bored quickly and save up for a car instead. Europe and the DSA have made it very difficult for 17yo to get a full licence to ride bigger bikes, btw bigger doesn't mean less safe, the safety here is controlled by the brain, the right hand and a fair bit of esp to work out what every other bugger is up to on the road, we're invisible you see and need to realise this to keep ourselves safe and ride accordingly.
All this is irrelevant in your case, your DS is 12 and can't legally ride that bike on the road till he's 17, it's a 50cc at 16, and then only after he has his licence, has completed his CBT (Compulsory Basic Training), has insurance, tax and wears a helmet! You need to actually talk to his father, put whatever personal stuff you have aside, I know it'll be difficult, and discuss the safety of your child. With correct instruction, the right gear and a safe place to ride, with supervision, this is no more unsafe than a pushbike downhill.
I've been riding since I was very young as has my DH and both my DSs. The youngest at 14 doesn't ride on the road, except as pillion, but has quite happily ridden our 600 single off road, with us in attendance, while we're there and a 600/4 around a CBT training ground with an authorised trainer to gain some experience handling larger machines. The oldest one had the same experiences at that age and now at 24 has been riding since he was 16, with a full licence, albeit restricted for 2 years as was then the case, since he was 17, he's got lots more actual riding experience than lots of other bikers I know that have only ridden occassionally for over 30 years.
This doesn't need to be a disaster, find out exactly what's going on from the man himself. If he's got no plan in place and has just, on a whim, with no bike experience or interest himself, bought your DS a bike as a toy, he is then an absolute numpty and you'd do well to look closely at said bike admiringly, find some wiring and pull, preferably up near the ignition switch/headstock or under the seat base, without leaving anything dangling so they give up looking for why it doesn't work. If you can't do that, make a few anonymous reports to the police about noise and little kids riding a small motorbike outside your exs house or your own, and get it impounded.