Most of our apps only display battery temperature. I googled for app that could show cpu temperature and couldn't find one (I read that the program that replaced system tuner / root could do it, but I'm not eager to give a program root access just for that).
I did find a very interesting trick:
How to check Galaxy S4 CPU temperature? - JayceOoi.com
Open your dialer and put in Key in *#0*#
It will load FactoryKeystring app menu, which the factory uses to test the phone.
That menu has lots of tests. To get to the one we're interested in, press sensors, then scroll to the bottom where it says temperature, then press "thermistors" over to the right.
It starts a running log of three columns of temperatures (in degrees C).
The 1st column is labeled AP. According to the webpage, that's application processor (cpu temp).
The 2nd column is labeled PAM. Don't know what that is.
The 3rd column is labeled BAT on the link and CHG on mine. He says it's battery. The value that I read off f CHG on mine also matched what my battery temperature widget was telling me, so ours is also battery although I don't know what CHG stands for.
So there you have it. If your phone gets unusually hot, you can launch that test and check not only your battery temp but also you cpu temperature. And lots of other stuff to play with in that menu too if you've got too much time on your hands. Be careful...while I was able to exit the temperature log using back button, I was not able to get out of the vibration test without rebooting my phone.