Traditional cereal-based foods usually include wheat flour in their formulations; however, the search for new products with new ingredients providing different properties to foods is widely pursued by food companies. Replacement of wheat by other flours can modify both nutritional properties and organoleptic characteristics of the final baked food, but can also impact the formation of potentially harmful compounds. The effect of the type of flour on the formation of furfurals and dicarbonyl compounds was studied in a dough model system during baking that contains water or glucose in order to promote the Maillard reaction and caramelization. The formation of methylglyoxal and glyoxal was significantly reduced in spelt and teff formulations compared to wheat flour formulations, respectively. In contrast, samples formulated with oat, teff, and rye showed a significant increase in the levels of 3-deoxyglucosone. Similarly, spelt and teff formulations presented significantly higher concentrations of hydroxymethylfurfural, and spelt, teff, and rye presented higher concentrations of furfural. Therefore, the formation of process contaminants and undesirable compounds in new food products formulated with different flours replacing the traditional wheat flour should be considered carefully in terms of food safety.