So I live in an apartment building and I have a Bug problem, go figure. I have had my place sprayed repeatedly to try and get rid of them, but within a few weeks they're always back, worse than when the cat came back. I have fought with the management office to no avail on fixing the holes in my wall -- in particular, the huge-ass holes left in the dry wall around the radiators going from wall to wall. I have given up. I can't afford to move. I want to live better. Is there foam or anything I can use that is heat-resistant and safe to touch a hot metal surface. The holes are quite large, about 6x5. They left off the whole bottom corner of dry wall where the radiator is and thought because the cover was there, that was ok. Any tips, suggestions, or advice? Please help!
See if you can get some drywall scraps (you certainly don't want to buy a whole sheet for this) and fill in the corner, then fill the remaining gaps with drywall compound (both of which are fine with hot metal.)
For a dire kludge if you can't manage to beg some scraps you could build up the whole thing from drywall tape and compound, but ANY place that's being drywalled generates scraps (and they are throwing them away) - anyone who has needed to do a large repair probably has the remaining part of the sheet they had to buy sitting in a basement or closet - you should be able to find some.
You might want to use silicone caulking between the drywall patch and the pipe itself, just because it will be less prone to cracking (so more resistant to bugs) than drywall compound right up against a hot pipe.
As to your question, yes, any of the polyurethane foams (read the label) are safe with a hot pipe, and you could potentially use the "low-expansion" type to augment this approach to sealing the wall - but I would not recommend it as the only method. Actually, given that you are in an apartment (and that a single can will probably do you) I'd suggest the "fireblock" type of foam if buying a can of foam.