Lehigh (1-5) put a stop to its longest losing streak since the 1967 team lost eight consecutive games.
The Mountain Hawks held a 17-7 lead in the fourth quarter when the Big Red struck quickly to tighten the score. Kyle Gallagher hit Collin Shaw for a 40-yard gain and set up Cornell on the 1. Gallagher threw to Matt Doneth for the score.
Lehigh answered with a 12-play, 78-yard drive that finished with Shafnisky scoring from the 2 with 3:17 remaining.
Cornell (0-5) gambled on the next series, going for it on fourth down from its own 23. Tim Newton and Matthew Laub sacked Gallagher for a 15 yard loss. Two plays later Rich Sodeke ran it in for the final score.