Cats get themselves into some pretty peculiar positions, but they can usually tell if something is too dangerous. I think the bigger threat here is cat hair in the cable box or the cat knocking over the cable box - those things aren't cheap.
If it has a bunch of wiring then I wouldn't recommend it. Also if it's decently high up or if it can be easily broken then I would be against it.
Oh it's fine, my cat Homer used to always sleep on the back of our TV because it's warm. :]
Also, blocking the vents on top could lead the cable box to overheat.
its not safe. Period.