do you use it while environment is hotter than 35°C?
did it happen while charging the battery?
did you root it?
no, thermal paste is not used for this kind of hardware. If it´s overheating, the chip or the battery is getting to hot itself by defect or hot environment or using the wrong charger, if it happens while charging.