We present observations and analysis of the broad-band afterglow of Swift GRB 071025. Using optical and infrared (RIYJHK) photometry, we derive a photometric redshift of 4.4 < z < 5.2; at this redshift our simultaneous multicolour observations begin at ̃30 s after the gamma-ray burst trigger in the host frame, during the initial rising phase of the afterglow. We associate the light-curve peak at ̃580 s in the observer frame with the formation of the forward shock, giving an estimate of the initial Lorentz factor Γ$_0$̃ 200. The red spectral energy distribution (even in regions not affected by the Lyman α break) provides secure evidence of a large dust column. However, the inferred extinction curve shows a prominent flat component between 2000 and 3000 ̊A in the rest frame, inconsistent with any locally observed template but well fitted by models of dust formed by supernovae. Time- dependent fits to the extinction profile reveal no evidence of dust destruction and limit the decrease in the extinction column to ΔA$_3000$ < 0.54 mag after t= 50 s in the rest frame. Together with studies of high-z quasars, our observations suggest a transition in dust properties in the early Universe, possibly associated with a transition between supernova-dominated and asymptotic giant branch-dominated modes of dust production.