The surgery last month was a success, and BikeNZ high performance director Mark Elliott said Hanlen was back on her bike and on target for Glasgow.
"It's a real relief for Karen," Elliott said. "She already feels the benefits and her training programme has her back on track for Glasgow.
"Even with this issue, her results in New Zealand and the World Cup were sufficient to earn a nomination, which has been supported by the New Zealand Olympic Committee."
Hanlen joins Kate Fluker in the women's event in Glasgow. She will head to Europe next month for a leadup race.
She joins fellow mountain bikers Anton Cooper, Sam Gaze and Fluker for the cross country race on July 29.