Cook was unbeaten on 39 and with him Ali 15 not out as England trail by 467 runs in reply to Pakistan's first innings of 523-8 declared after day two at Sheikh Zayed Stadium.
England batsmen will have to bat out of their skins to thwart Pakistan's pace-cum-spin attack on a pitch which did not help the bowlers on the first two days but can change its nature as the game progresses.
It was a day to remember for Malik as he capped his return to the Test side after a gap of five years with an epic knock of 245, his best score in Test cricket, after coming into bat in the third over of the match on Tuesday.
Asad Shafiq, who scored 107 for his ninth hundred, added 248 runs with Malik -- a new record in Pakistan-England Tests -- as Pakistan added 213 runs in the two sessions after resuming the day at 286 for four.
More From This Section
Malik steered paceman James Anderson towards third man for two to complete his double hundred off 367 balls. He took off his helmet and bowed down on the turf in celebration.
Shafiq also completed his century with a sweep boundary off leg-spinner Adil Rashid as the pair erased the previous best fifth-wicket stand of 219 set by Paul Collingwood and Eoin Morgan at Nottingham in 2010.
Shafiq went soon after tea, when he was trapped leg before wicket off seamer Mark Wood while Sarfraz Ahmed (two) and Zulfiqar Babar (nought) also fell to Stokes.