Bradley Fewster at the double to give Minstermen welcome victory over Exeter
On-loan Middlesbrough striker Bradley Fewster's brace saw York climb out of the League Two relegation zone.
Fewster struck in each half as the Minstermen leapfrogged Yeovil in the table following a 2-0 triumph over Exeter.
The home side opened the scoring on 35 minutes when Fewster fired a low shot in from 15 yards after Michael Coulson's square pass.
The Grecians might have levelled almost immediately but Jayden Stockley's header rattled Scott Flinders' crossbar.
On-loan Bournemouth striker Stockley also headed over Flinders' unguarded net after he had beaten the York keeper to Matt Oakley's left-wing cross.
It was York, though, who doubled their advantage with Fewster's second of the night on 64 minutes.
He poked an edge-of-the-box effort into the bottom-right corner of Exeter keeper Bobby Olejnik's net, following Lubomir Satka's through ball.