Cascades of temperature and entropy fluctuations are studied by numerical simulations of stationary three-dimensional compressible turbulence with a heat source. The fluctuation spectra of velocity, compressible velocity component, density and pressure exhibit the $-5/3$ scaling in an inertial range. The strong acoustic equilibrium relation between spectra of the compressible velocity component and pressure is observed. The $-5/3$ scaling behaviour is also identified for the fluctuation spectra of temperature and entropy, with the Obukhov–Corrsin constants close to that of a passive scalar spectrum. It is shown by Kovasznay decomposition that the dynamics of the temperature field is dominated by the entropic mode. The average subgrid-scale (SGS) fluxes of temperature and entropy normalized by the total dissipation rates are close to 1 in the inertial range. The cascade of temperature is dominated by the compressible mode of the velocity field, indicating that the theory of a passive scalar in incompressible turbulence is not suitable to describe the inter-scale transfer of temperature in compressible turbulence. In contrast, the cascade of entropy is dominated by the solenoidal mode of the velocity field. The different behaviours of cascades of temperature and entropy are partly explained by the geometrical properties of SGS fluxes. Moreover, the different effects of local compressibility on the SGS fluxes of temperature and entropy are investigated by conditional averaging with respect to the filtered dilatation, demonstrating that the effect of compressibility on the cascade of temperature is much stronger than on the cascade of entropy.