Check the speedo cable at two places.
First, where the factory ziptied to the brake cable. Jiggle it around while riding to see if it changes. If this is the problem, you have 2 options. Replace the cable ($80) or cut the housing and solder the 3 wires where it broke.
Second, check the speedo cable down by the fender. It's known to rub on the fender and break.
You can do a search as these are 2 very common problems.
'08 KTM 450 EXC-R
"I LOVE my bike!!!"