Also of you do not have access to a helicoil etc.
Drill the old stud out M7
Drill the hole to 8.5
Tap the hole to M10 with a taper tap only
File an M10 bolt to a blunt point.
With thread lock screw the bolt in tight
Cut the bolt off at face level
Drill and tap the new bolt to M7
Bit long winded but really does work if you have a limited budget or access to tools.