When you say overheating, do you mean it is too hot to handle? All Lithium-Ion batteries get warm, as well as the charger, during charging. Charging does work on the battery so it warms up. It should not get too hot to handle, however.
If it is too hot, take the iPhone to an Apple store genius bar and have it checked by the techs to see if something is wrong.