Cambridge came from behind to steal the points from 10-man York.
The hosts took the lead when Craig Farrell - who had earlier hit the bar - struck a 37th-minute penalty after a foul on Martyn Woolford.
But five minutes after the break Gavin Hoyte followed up Mark Albrighton's header to equalise for Cambridge.
Then Lee Boylan fired home from the penalty spot after a tangle between Stuart Elliott and Leo Fortune-West which saw the City man sent off.
York: Evans, Purkiss, McGurk, Jones, Robinson, Brayson (Greenwood 56), Panther, Elliott, Woolford, Farrell (Sodje 61), Beardsley (Brodie 61).
Subs Not Used: Pentney, Hutchinson.
Sent Off: Elliott (54).
Goals: Farrell 38 pen.
Cambridge Utd: Potter, Morrison, Albrighton, Hoyte (Peters 76), Gleeson, Quinton, Brown, Convery (Reed 68), Pitt (Stephen Smith 71), Boylan, Fortune-West.
Subs Not Used: Rendell, McShane.
Booked: Brown, Hoyte.
Goals: Hoyte 51, Boylan 56 pen.
Ref: J. Waugh (England).