The Canadiens hold the sixth spot in the Eastern Conference playoff race but are only two points in front of Buffalo and could slip down one position before the season ends this weekend.
Ottawa faced a 1-0 deficit heading into the third period but Jason Spezza tied it 36 seconds into the stanza and Bobby Butler put the Senators in front with 2:49 left in regulation.
Mike Cammalleri forced overtime with a goal that came only 11 seconds from the end of the third.
Kuba ended it by firing a wrist shot from the right point that eluded Alex Auld.
Craig Anderson earned the victory with 27 saves. Auld stopped 29-of-32 shots.