For me the concern is not malware but crappy/insecure software proudly exposing itself on the internet.
Many IP cameras will use UPnP to make their web interface publicly accessible. Because of the long history of opening router ports, seeing a random open port on my public IP was quite surprising. If you haven't recently, check your own public IP in Shodan.io .
The cameras I've used run crappy web interfaces that almost certainly do not get security updates. If an attack was successful on the camera, from there the attacker would have access to my internal network.