Ahmad Starks added 15 points, Devon Collier 13 and Joe Burton 10 for the Beavers (14-7, 4-5 Pac-12), who won for just the second time in their last 19 trips to Eugene.
Devoe Joseph scored 26 points and E.J. Singler added 16 for Oregon (15-6, 6-3), which had a season-high 23 turnovers.
Trailing 73-70 in the final minute, the Ducks had a chance for a tie but Singler missed a 3-pointer and Oregon turned the ball over after getting the rebound.
Oregon State trailed 28-23 at halftime and 45-39 with 13:11 left to play. But Cunningham, who was 1 for 7 in the first half, hit 5 of 7 shots after the break and was 6 for 8 from the free-throw line in the final two minutes.