Said AI could certainly be programmed to probe for weaknesses in its runtime environment.
However... the game theory on that becomes very interesting, because the sender can't assume that the AI's probes will be immediately successful and they will instantly run out and take total control over the host network so thoroughly that the hack can't be detected. And sending out an AI that tries to break out and then tries to do something nasty is an act of war against an adversary you know nothing about. For all you know, the psychology of that species is such that they will now dedicate every erg of energy to the sole task of wiping your species out until the threat is gone. For all you know, your AI was first executed in an environment that deliberately left some big holes in it and those holes were completely set up with tripwires. Such is the nature of the virtual world. And if the AI does trigger the tripwire, we can also analyze it to find out what it "would" do if it broke out. So it's definitely not a "ha ha ha we nuked our competitors with no risk to ourselves just by sending out a single trasmission" situation.
I'm not saying there isn't a whole interesting conversation to be had. I am saying the idea that the aliens can somehow send out data that is somehow encoded in SuperIntegers that instantly SuperHack every computer that you try to SuperUse them on... that's a bad computer-animated cartoon for kids, not a realistic threat. There is a real threat, but it's more complicated and generally smaller, perhaps with a super weird spike at the top end, but even then, per my previous paragraph, more complicated than I think people are thinking here, because the aliens do not have access to these SuperIntegers any more than we do.