It is Makrūh to brush the teeth with toothpaste, or use mouthwash whilst fasting. This is because of the taste of the paste and because of the risk of something going down the throat. If something did go down the throat, it will break the fast as well. One should use a Miswaak. If the Miswaak was fresh and it had a pleasant taste that would not harm the fast. It will not even be Makrūh, nor will it affect the fast.
وكره له ذوق شئ ومضغه
ولا بأس بالسواك الرطب واليابس فى الغداة والعشى ولا يكره الكحل
ولا دهن شاربه كذا فى الكنز
شامى بيروت ص 352 / 3 فتاوى دار العلوم ص 404 / 6 تحفة ص 74
علمجيرى ص 199 / 1 جواهر الفقه ص 379 / 1 تحفة ص 26
Extracted from A Gift for Ramadhan, Page 60.