Glasgow's Celtic League revival hit the buffers as they produced one of their poorest performances at Hughenden.
Glasgow (10) 24
Tries: Howarth, Roberts, Lamont
Pens: Parks, Howarth
Blues (14) 28
Tries: N Robinson, Morgan, Molitika (2)
Cons: N Robinson (3), L Thomas
Despite taking a 10-point lead, Glasgow's poor defensive play allowed the Blues to take a half-time lead that they never looked like conceding.
Nicky Robinson, Maama Molitika (2) and Craig Morgan were the try scorers for the Cardiff side.
Calvin Howarth, Mike Roberts and Rory Lamont went over for Glasgow but they had to be content with a bonus point.
Glasgow edged in front with a penalty by skipper Dan Parks and Calvin Howarth nipped in for a great try that was converted for a 10-0 lead.
But Howarth was left standing as Nicky Robinson scored after a 40-metre run, and he was again at fault as winger Craig Morgan ambled in at the corner.
It was a similar story after the break as Maama Molitika brushed aside a series of weak challenges to romp in under the crossbar to give Robinson an easy conversion.
Glasgow clawed back five points almost instantly as winger Mike Roberts touched down, but Cardiff were soon back in command with Molitika barrelling over from close quarters to record his double.
Rory Lamont hurtled over for Glasgow to ensure a dramatic finale and Howarth salvaged a consolation bonus point with a stoppage-time strike.
Blues coach Dai Young:
"If we're going to be successful away from home we have to take the game to sides.
"We did that, but too many silly mistakes put us under pressure.
"That's two wins on the bounce, though, and we have to be happy with that."
Glasgow: Howarth, Lamont, Craig, Barrow, Roberts, Parks, Pinder, Tckachuk, Lawson, Harrison, Barker, Hamilton, Swindall, Barclay, Dearlove.
Replacements: Morrison for Craig (61), O'Hare for Roberts (77), Beveridge for Pinder (71), Thomson for Lawson (76), Turner for Hamilton (61), Hayter for Dearlove (61). Not Used: Corsar.
Blues: R. Williams, Czekaj, J. Robinson, L. Thomas, Morgan, N. Robinson, R. Powell, Yapp, G. Williams, Evans, D. Jones, Sidoli, Molitika, Sowden-Taylor, A. Powell.
Replacements: Roberts for Morgan (67), R. Thomas for G. Williams (20), Quinnell for D. Jones (67), Llewellyn for R. Thomas (80). Not Used: Lewis, Phillips, Nuthall.
Ref: D Courtney (SRFU).