We report on an optical and thermal model that allows one to quantify the local heating effect in a cavity ring-down spectroscopy (CRDS) experiment. The effect is due to the intracavity absorption of the laser radiation propagating inside the optical cavity, when this latter is filled with an absorbing gas. The local heating generates a temperature profile into the volume probed by the laser radiation, thus leading to a systematical deviation in temperature measurements by means of Doppler-broadening gas thermometry. Exploiting the representation of the cavity as a linear system for the electric field in the frequency domain, we were able to determine the spatial and temporal behaviors of the heating source and solve the inhomogeneous Fourier heat transfer equation using the method of the Green's functions. The local heating effect is strongly dependent on several parameters characterizing the CRDS experiment, including the geometrical size of the cavity, the two mirrors' reflectivity and loss, the absorption coefficient of the intracavity gaseous medium, the incident power, and the intracavity beam waist. The dynamical behavior of the gas temperature was calculated in three experimental regimes, depending on the laser switch-on time interval as compared to the cavity decay time and heat diffusion characteristic time. In the worst case, the local heating provides a systematical shift in Doppler broadening thermometry of about one part per million.